
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... 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?