Documentation for GHC primops

Duncan Coutts duncan.coutts at
Wed Jun 29 13:47:53 EDT 2005

On Wed, 2005-06-29 at 16:49 +0200, Jens Fisseler wrote:
> > Would someone cares to write this new backend to "genprimopcode".  The
> > latter is a Haskell program that can parse primops.txt.pp, and already
> > has two back ends (a) and (b) above.  What we want is to add (c)
> > generate Haskell that Haddock can understand.
> > 
> > Note that the documentation itself is already written -- it's in
> > primpos.txt.pp.  That's what's so tantalising.  All that we need is to
> > mangle it into Haddock.  
> > 
> > 
> > Any volunteers?  It doesn't involve touching GHC itself.
> > "gemprimopcode" is a completely standalone Haskell program, currently
> > some 730 lines long. 
> If no one else is willing to do it, count me in.

You may like to start by borrowing some code from a code generator
written for Gtk2Hs which produces Haskell modules with Haddock comments
(extracted from another source). So in particular, there is code for
formatting Haddock markup. You can see it here:

and specifically:

I'm not claiming it's highly general and usable for your purpose as it
is now but it might be a useful source for code snippets.


More information about the Glasgow-haskell-users mailing list