[Haskell-cafe] Problems with code blocks in the description field in a .cabal file

Josef Svenningsson josef.svenningsson at gmail.com
Mon Feb 4 13:30:50 CET 2013


Hi,

I'm putting together a cabal package and I'd like to have some code
examples in my description file. In particular I would like to have a code
block containing markdown containing a code block of Haskell, like this:

> ~~~{ .haskell }
> module Main where
>
> main = putStrLn "Hello World!"
> ~~~

When I put the above code in my .cabal file and do `cabal haddock
--executables` I get the following error:

haddock: failed to parse haddock prologue from file:
dist/doc/html/codeExtract/codeExtract/haddock-prolog31969.txt

In general I can provoke the parse error from haddock whenever I have
something inside curly braces.

So the error seems to stem from haddock. I've tried to track down what
happens inside haddock but I've run out steam. I'd like to know if there is
anything I can do to be able to write something like the above as part of
the description in my .cabal file.

Thanks,

Josef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130204/82653cae/attachment.htm>


More information about the Haskell-Cafe mailing list