[Haskell] haddock/ghc feature request

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Apr 13 10:03:05 EDT 2004


I have a bunch of (polymorphic) function declarations like

foo :: C a
     => A a -- ^ comment
     -> B a -- ^ comment
foo = ...

and haddock does a very fine job on them.


but then I wanted (needed) to specialize them,
and to avoid duplicating information, I wrote

type Foo a = A a -- ^ comment
	-> B a -- ^ comment
foo :: C a => Foo a
{-# SPECIALIZE  foo :: Foo Int #-}

problem is, haddock does not want to parse
the comments in the type Foo definition.
(I think in case of such errors (malformed annotation),
haddock should try to ignore and continue, instead of just give up.)


On the other hand, it would be still better if ghc
would have something like  -fauto-specialize-all
(that is, for all instances that are needed
for the current `main' definition)
so that I wouldn't have to change the source code at all.

I vaguely remember there was a preprocessor
(independent of ghc, written by someone else)
that did "full specialization"?
-- 
-- Johannes Waldmann,  Tel/Fax: (0341) 3076 6479 / 6480 --
------ http://www.imn.htwk-leipzig.de/~waldmann/ ---------



More information about the Haskell mailing list