[Haskell] Haddock and type operators

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Thu Apr 19 03:31:33 EDT 2007


Am Donnerstag, 19. April 2007 00:20 schrieben Sie:
> On Wed, Apr 18, 2007 at 07:29:21PM +0200, Wolfgang Jeltsch wrote:
> > Hello everybody,
> >
> > I urgently need Haddock support for type operators like in the following
> > code snippet:
> >
> >     infix  2 :::, :=
> >     infixl 9 :.:
> >
> >     data name ::: value = name := value
> >     newtype Composition f g a = Composition { runComposition :: f (g a) }
> >     type (:.:) = Composition
> >
> > Does anybody know whether this is easy to implement or whether there is a
> > quick hack to make this work?  Can I do the hacking myself or is deeper
> > knowledge of the Haddock source code necessary to provide this feature?
> >
> > Thank you in advance for any help.
>
> A much better solution would be to upgrade to David Waern's
> expiremental fork of Haddock, which does parsing using the GHC API and
> can handle all the syntactic constructs GHC can:
>
> http://darcs.haskell.org/SoC/haddock.ghc/

How mature is this?  Is this an already finished Summer of Code project?

> Note that this installs an executable named 'haddock' which is
> sufficiently incompatible command line wise with the standard haddock
> to break Cabal's haddock support; you can work around this with (when
> configuring a program you want to haddock)
> --with-haddock=/path/to/old/haddock.

Hmm, in the light of this I might stay with the old Haddock modified by my 
patch.  I’d like Cabal’s Haddock support to work.

> Stefan

Wolfgang


More information about the Haskell mailing list