[Haddock] darcs patch: fix for hoogle bug 184 (Type aliases with function operators)

Matt Brown matt at softmechanics.net
Tue Oct 12 14:06:49 EDT 2010


I've attached a patch to fix hoogle bug 184
(http://code.google.com/p/ndmitchell/issues/detail?id=184), which
affects libraries (such as HList) defining type operators:

$ hoogle --convert=dist/doc/html/HList/HList.txt
Converting /tmp/HList-0.2.3/dist/doc/html/HList/HList.txt
hoogle: "/tmp/HList-0.2.3/dist/doc/html/HList/HList.txt" (line 1208, column 6):
unexpected ":"
expecting space, "(", "forall", "[" or "!"

$ sed -n 1208p dist/doc/html/HList/HList.txt
type :*: e l = HCons e l

The patch simply postprocesses the output generated by haddock, adding
parentheses liberally.  For HList:

$ diff HList.bak HList.txt
< type :*: e l = HCons e l
< type :=: l v = LVPair l v
> type (:*:) e l = HCons e l
> type (:=:) l v = LVPair l v
< type :+: e l = HCons (Proxy e) l
> type (:+:) e l = HCons (Proxy e) l

I've verified the patch resolves the issue for the three affected
packages listed in the bug report: HList, typical, and IOSpec.

-Matt Brown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hoogle_bug_184.dpatch
Type: application/octet-stream
Size: 46927 bytes
Desc: not available
Url : http://projects.haskell.org/pipermail/haddock/attachments/20101012/24129339/attachment-0001.obj 

More information about the Haddock mailing list