[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:

\begin{code}
main = putStrLn "Hello world!"
\end{code}

\begin{code}%
main = -- TODO
\end{code}%

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:

http://hackage.haskell.org/packages/archive/dbus-core/0.2/logs/failure/ghc-6.10

dist/build/tmp23596/DBus/Bus/Connection.hs:119:12:
    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:

\begin{code}%
-- TODO
tcp :: A.Address -> Transport
tcp a@(A.Address _ params) = handleTransport a connect' where
	connect' = do
		-- check host
		-- check port
		-- check family
		-- return handle
\end{code}%

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