[Haskell-cafe] Hackage bug? Autobuild failure on literate source with ignored code blocks.

John Millikin jmillikin at gmail.com
Sun Sep 27 16:06:20 EDT 2009

According to <http://www.haskell.org/haskellwiki/Literate_programming>,
the following should compile properly because the second block of code
will be ignored by GHC:

main = putStrLn "Hello world!"

main = -- TODO

However, Hackage's automatic build system seems to pre-process the
literate source in such a way that the ignored block is included in
the .hs source, resulting in a compilation error:


    Empty 'do' construct

The block in question is a TODO feature that should be included in
documents generated from the LaTeX source, but does not build and
shouldn't be parsed as Haskell:

tcp :: A.Address -> Transport
tcp a@(A.Address _ params) = handleTransport a connect' where
	connect' = do
		-- check host
		-- check port
		-- check family
		-- return handle

Although Hackage fails to build the package, it works fine on my local
system when I run "cabal configure && cabal build && cabal haddock". Is
this a bug in the Hackage auto-build mechanism, or have I done something
wrong when uploading the package?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090927/8c6687d1/attachment.bin

More information about the Haskell-Cafe mailing list