[Haddock] darcs patch: fix for hoogle bug 184 (Type aliases with function operators)
David Waern
david.waern at gmail.com
Sat Oct 16 13:50:13 EDT 2010
2010/10/12 Matt Brown <matt at softmechanics.net>:
> Hello,
>
> 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
> 1208,1209c1208,1209
> < type :*: e l = HCons e l
> < type :=: l v = LVPair l v
> ---
>> type (:*:) e l = HCons e l
>> type (:=:) l v = LVPair l v
> 1294c1294
> < 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.
Thanks, but this is a bug that should be fixed in the GHC pretty
printer that is used by the Hoogle backend. I think I saw some patch
go by on cvs-ghc that does that, but I'm not completely sure. In any
case it's a pretty simple fix.
David
More information about the Haddock
mailing list