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/ 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. Stefan