I've been wrestling the last few days with putting Haddock documentation into my code. After a dead-simple library failed to generate anything meaningful, I gave up, turfed my copy of Haddock and downloaded the latest from the web site. (Haddock 0.8, it seems.) runhaskell Setup.lhs configure runhaskell Setup.lhs build runhaskell Setup.lhs install These three worked fine and I verified with "which haddock" that the right executable is being run. Then I typed "runhaskell Setup.lhs haddock" and got this: michael@isolde:~/Development/haddock-0.8$ runhaskell Setup.lhs install Installing: /home/michael/software/lib/haddock-0.8/ghc-6.6.1 & /home/michael/software/bin haddock-0.8... michael@isolde:~/Development/haddock-0.8$ which haddock /home/michael/software/bin/haddock michael@isolde:~/Development/haddock-0.8$ runhaskell Setup.lhs haddock Preprocessing executables for haddock-0.8... Running Haddock for haddock-0.8... Warning: cannot use package haddock-0.8: ghc-pkg failed Warning: cannot use package base-2.1.1: interface /home/michael/software/share/ghc-6.6.1/html/libraries/base/base.haddock does not exist. Warning: cannot use package haskell98-1.0: HTML directory /home/michael/software/share/ghc-6.6.1/html/libraries/haskell98 does not exist. dist/build/tmp/src/Main.hs:"dist/build/tmp/src/Main.hs": 39:1: Parse error michael@isolde:~/Development/haddock-0.8$ This is exactly the same problem I had running Haddock on my own project. What's the next step from here? -- Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com) A well-designed and humane interface does not need to be split into beginner and expert subsystems. (Jef Raskin)
ttmrichter:
I've been wrestling the last few days with putting Haddock documentation into my code. After a dead-simple library failed to generate anything meaningful, I gave up, turfed my copy of Haddock and downloaded the latest from the web site. (Haddock 0.8, it seems.)
runhaskell Setup.lhs configure runhaskell Setup.lhs build runhaskell Setup.lhs install
These three worked fine and I verified with "which haddock" that the right executable is being run. Then I typed "runhaskell Setup.lhs haddock" and got this:
michael@isolde:~/Development/haddock-0.8$ runhaskell Setup.lhs install Installing: /home/michael/software/lib/haddock-0.8/ghc-6.6.1 & /home/michael/software/bin haddock-0.8... michael@isolde:~/Development/haddock-0.8$ which haddock /home/michael/software/bin/haddock michael@isolde:~/Development/haddock-0.8$ runhaskell Setup.lhs haddock Preprocessing executables for haddock-0.8... Running Haddock for haddock-0.8... Warning: cannot use package haddock-0.8: ghc-pkg failed Warning: cannot use package base-2.1.1: interface /home/michael/software/share/ghc-6.6.1/html/libraries/bas e/base.haddock does not exist. Warning: cannot use package haskell98-1.0: HTML directory /home/michael/software/share/ghc-6.6.1/html/libraries/has kell98 does not exist.
All fine up to this point.
dist/build/tmp/src/Main.hs:"dist/build/tmp/src/Main.hs": 39:1: Parse error
Parse error in oen of the comments, around line 39.
michael@isolde:~/Development/haddock-0.8$
This is exactly the same problem I had running Haddock on my own project. What's the next step from here?
Check that the comment is not using one the chars invalid in H98/haddock. '/' is a common source of issues. -- Don
On Sat, 2007-07-07 at 11:17 +1000, Donald Bruce Stewart wrote:
Check that the comment is not using one the chars invalid in H98/haddock. '/' is a common source of issues.
I really hope that the Haddock source doesn't use invalid Haddock comments.... ;) -- Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com) All really first class designers are both artists, engineers, and men of a powerful and intolerant temper, quick to resist the least modification of the plans, energetic in fighting the least infringement upon what they regard as their own sphere of action. (Nevil Shute)
On Sat, Jul 07, 2007 at 09:11:55AM +0800, Michael T. Richter wrote:
I've been wrestling the last few days with putting Haddock documentation into my code. After a dead-simple library failed to generate anything meaningful, I gave up, turfed my copy of Haddock and downloaded the latest from the web site. (Haddock 0.8, it seems.)
runhaskell Setup.lhs configure runhaskell Setup.lhs build runhaskell Setup.lhs install
These three worked fine and I verified with "which haddock" that the right executable is being run. Then I typed "runhaskell Setup.lhs haddock" and got this:
michael@isolde:~/Development/haddock-0.8$ runhaskell Setup.lhs install Installing: /home/michael/software/lib/haddock-0.8/ghc-6.6.1 & /home/michael/software/bin haddock-0.8... michael@isolde:~/Development/haddock-0.8$ which haddock /home/michael/software/bin/haddock michael@isolde:~/Development/haddock-0.8$ runhaskell Setup.lhs haddock Preprocessing executables for haddock-0.8... Running Haddock for haddock-0.8... Warning: cannot use package haddock-0.8: ghc-pkg failed Warning: cannot use package base-2.1.1:
interface /home/michael/software/share/ghc-6.6.1/html/libraries/base/base.haddock does not exist. Warning: cannot use package haskell98-1.0: HTML directory /home/michael/software/share/ghc-6.6.1/html/libraries/haskell98 does not exist. dist/build/tmp/src/Main.hs:"dist/build/tmp/src/Main.hs": 39:1: Parse error michael@isolde:~/Development/haddock-0.8$
This is exactly the same problem I had running Haddock on my own project. What's the next step from here?
You've just ran into Cabal bug #14, or maybe #102. http://hackage.haskell.org/trac/hackage/ticket/14 http://hackage.haskell.org/trac/hackage/ticket/102 Stefan
On Fri, 2007-06-07 at 18:22 -0700, Stefan O'Rear wrote:
You've just ran into Cabal bug #14, or maybe #102.
http://hackage.haskell.org/trac/hackage/ticket/14 http://hackage.haskell.org/trac/hackage/ticket/102
It doesn't appear to be either of these. My own projects use no form of pre-processing and exhibit exactly the same problem: a parse error on first character of the line after the first Haddock comment. I don't know if the Haddock project itself (whose output I put up here) uses pre-processing, but I know for a fact my code does not. -- Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com) A well-designed and humane interface does not need to be split into beginner and expert subsystems. (Jef Raskin)
On Sat, Jul 07, 2007 at 09:40:57AM +0800, Michael T. Richter wrote:
On Fri, 2007-06-07 at 18:22 -0700, Stefan O'Rear wrote:
You've just ran into Cabal bug #14, or maybe #102.
http://hackage.haskell.org/trac/hackage/ticket/14 http://hackage.haskell.org/trac/hackage/ticket/102
It doesn't appear to be either of these. My own projects use no form of pre-processing and exhibit exactly the same problem: a parse error on first character of the line after the first Haddock comment. I don't know if the Haddock project itself (whose output I put up here) uses pre-processing, but I know for a fact my code does not.
The haddock project does. Parse error on the first line after a Haddock comment is a givaway that you have bad haddock syntax, either in the comment itself or possibly the .cabal file (you need to escape slashes in the package description - that was a big pain to figure out for me). Stefan
On Fri, 2007-06-07 at 18:43 -0700, Stefan O'Rear wrote:
It doesn't appear to be either of these. My own projects use no form of pre-processing and exhibit exactly the same problem: a parse error on first character of the line after the first Haddock comment. I don't know if the Haddock project itself (whose output I put up here) uses pre-processing, but I know for a fact my code does not.
The haddock project does.
Parse error on the first line after a Haddock comment is a givaway that you have bad haddock syntax, either in the comment itself or possibly the .cabal file (you need to escape slashes in the package description - that was a big pain to figure out for me).
And there it was. The .cabal file was the culprit, not the Haskell source. Thanks, Stefan. -- Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com) I'm not schooled in the science of human factors, but I suspect surprise is not an element of a robust user interface. (Chip Rosenthal)
participants (3)
-
dons@cse.unsw.edu.au -
Michael T. Richter -
Stefan O'Rear