Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
a3222f61
Commit
a3222f61
authored
Jan 26, 2014
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding hoogle support for classes, closes #158
parent
22b9e06d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
Test.ipynb
notebooks/Test.ipynb
+2
-2
custom.css
profile/static/custom/custom.css
+3
-0
Hoogle.hs
src/IHaskell/Eval/Hoogle.hs
+8
-0
Main.hs
src/Main.hs
+0
-3
No files found.
notebooks/Test.ipynb
View file @
a3222f61
...
...
@@ -48,7 +48,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
":
info IHaskellDisplay
"
":
hoogle printf
"
],
"language": "python",
"metadata": {},
...
...
@@ -58,7 +58,7 @@
"output_type": "display_data"
}
],
"prompt_number":
6
"prompt_number":
1
},
{
"cell_type": "code",
...
...
profile/static/custom/custom.css
View file @
a3222f61
...
...
@@ -34,6 +34,9 @@ Custom IHaskell CSS.
.hoogle-module
{
font-weight
:
bold
;
}
.hoogle-class
{
font-weight
:
bold
;
}
/* Styles used for basic displays */
.get-type
{
...
...
src/IHaskell/Eval/Hoogle.hs
View file @
a3222f61
...
...
@@ -150,6 +150,12 @@ renderSelf string loc
span
"hoogle-module"
(
link
loc
$
extractModule
string
)
++
packageSub
package
|
startswith
"class"
string
=
let
package
=
extractPackageName
loc
in
cls
++
" "
++
span
"hoogle-class"
(
link
loc
$
extractClass
string
)
++
packageSub
package
|
otherwise
=
let
[
name
,
args
]
=
split
"::"
string
package
=
extractPackageName
loc
...
...
@@ -163,8 +169,10 @@ renderSelf string loc
where
extractPackage
=
strip
.
replace
"package"
""
extractModule
=
strip
.
replace
"module"
""
extractClass
=
strip
.
replace
"class"
""
pkg
=
span
"hoogle-head"
"package"
mod
=
span
"hoogle-head"
"module"
cls
=
span
"hoogle-head"
"class"
unicodeReplace
::
String
->
String
unicodeReplace
=
...
...
src/Main.hs
View file @
a3222f61
...
...
@@ -327,6 +327,3 @@ replyTo _ ObjectInfoRequest{objectName=oname} replyHeader state = do
objectDocString
=
Chars
.
pack
docs
}
return
(
state
,
reply
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment