Support type as item.

This commit is contained in:
Thomas Peiselt 2018-11-01 20:45:32 +01:00
parent c693ce307e
commit 6788944a45

View File

@ -188,6 +188,12 @@ renderSelf string loc
span "hoogle-class" (link loc $ extractNewtype string) ++
packageSub package
| "type" `isPrefixOf` string =
let package = extractPackageName loc
in nwt ++ " " ++
span "hoogle-class" (link loc $ extractType string) ++
packageSub package
| otherwise =
let [name, args] = split "::" string
package = extractPackageName loc
@ -204,6 +210,7 @@ renderSelf string loc
extractClass = strip . replace "class" ""
extractData = strip . replace "data" ""
extractNewtype = strip . replace "newtype" ""
extractType = strip . replace "newtype" ""
pkg = span "hoogle-head" "package"
mdl = span "hoogle-head" "module"
cls = span "hoogle-head" "class"