[Haskell-cafe] Re: Documentation on hackage
Claus Reinke
claus.reinke at talk21.com
Mon Jun 15 13:49:59 EDT 2009
>> who needs this kind of documentation?
>>
>> http://hackage.haskell.org/packages/archive/tfp/0.2/doc/html/Types-Data-Num-Decimal-Literals.html
>
> The code below is shown under 'Source' links
> in that documentation. I don't understand it,
> but it seems everything is generated automatically.
> What should the author do to avoid those comments?
Older versions of haddock used to define a CPP constant that
could be used to tweak the code for haddock. Since newer
versions nominally support every feature that GHC supports,
that CPP support was dropped.
(a) it would be nice if haddock still identified itself via CPP,
just like GHC does. Then users would at least have the
option to work around current limitations / bugs in haddock,
as well as present tweaked presentations of their interfaces.
(b) it seems sensible for haddock to provide two options for
handling template Haskell code:
- document the TH code
- document the code generated by TH
In this case, the first option would seem more suited.
Claus
> module Types.Data.Num.Decimal.Literals where
>
> import Types.Data.Num.Decimal.Literals.TH
>
> import Types.Data.Num.Decimal.Digits
> import Types.Data.Num.Ops
>
> $( decLiteralsD "D" "d" (-10000) (10000) )
>
> --
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list