[Haddock] [haddock] #197: Haddock chokes when no main module is given using lhs and cabal.
haddock
haddock at projects.haskell.org
Thu Mar 22 19:45:02 GMT 2012
#197: Haddock chokes when no main module is given using lhs and cabal.
-----------------------+----------------------------------------------------
Reporter: timthelion | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 2.10.0
Version: 2.9.4 | Resolution:
Keywords: |
-----------------------+----------------------------------------------------
Comment(by duncan):
Note that the .cabal and .lhs files are not needed to reproduce the
problem, simply the lit.hs file like this:
{{{
-- | Hi there
main = print "Hello World!"
}}}
fails with error:
{{{
lit.hs:3:1: parse error on input `main'
}}}
If you add a `module Main where` to the top then it works fine.
In case it matters, full command line was:
{{{
haddock --dump-interface=dist/doc/html/Lit/helloworld/Lit.haddock
--optghc=-package-name --optghc=Lit-1.0 --verbosity=1 --html
--odir=dist/doc/html/Lit/helloworld --title=helloworld --optghc=-hide-all-
packages --optghc=-fbuilding-cabal-package --optghc=-i
--optghc=-idist/build --optghc=-i. --optghc=-idist/build/autogen
--optghc=-Idist/build/autogen --optghc=-Idist/build --optghc=-optP-include
--optghc=-optPdist/build/autogen/cabal_macros.h --optghc=-odir
--optghc=dist/build --optghc=-hidir --optghc=dist/build --optghc=-stubdir
--optghc=dist/build --optghc=-O --optghc=-XHaskell98 --optghc=-odir
--optghc=dist/build/tmp-27089 --optghc=-hidir
--optghc=dist/build/tmp-27089 --optghc=-stubdir
--optghc=dist/build/tmp-27089 -B/usr/local/lib/ghc-7.0.4 lit.hs
--optghc=-package --optghc=base
}}}
--
Ticket URL: <http://trac.haskell.org/haddock/ticket/197#comment:1>
haddock <http://www.haskell.org/haddock>
Haddock, The Haskell Documentation Tool
More information about the Haddock
mailing list