[Haskell-cafe] Haddock Parse Errors

SevenThunders mattcbro at earthlink.net
Fri Oct 6 14:36:10 EDT 2006

Ivan Perez-4 wrote:
> Matthew Bromberg wrote:
> I can't help you about the haddock thing but, in my experience,
> if you forgive that kind of mistakes, many users will write
> documentation with
> lots of warnings and say "ok, these docs ain't right but, it works for
> me".
> I guess this is mostly what has happened to HTML, you can find lots and
> lots
> of documents that "work" (well, depending on the browser you are using),
> but they
> are obviously wrong.
> Maybe the solution to this kind of problems is haddock to give more
> information
> about the parse error, like: "Found token A when expecting one of
> B or D",
> so at least you know what you should have written instead.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

I understand your point, but this is documentation, not mission critical
code.  I am fortunate that I even have time to try to fix this right now. 
Had I seen this last week I would have just given up in frustration.  Here
is another arcane example

-- |  compute cos (theta / 2) assuming the branch [-pi, pi]
halfcos :: Double ->  Double
halfcos cs = sqrt $ (cs + 1)/2

This produces a parse error
parse error in doc string: [haddock.exe: reading EOF!
on the h of the 
halfcos :: Double -> Double

Don't get me wrong,  I am appreciative of the fact that this tool exists,
I'm just having trouble using it properly.
Also I'm the kind of person that views warnings when compiling my source
code as errors.  Thus I wouldn't accept unproperly formatted html.  For code
documentation, however,  I can't get that worried about it.
View this message in context: http://www.nabble.com/Haddock-Parse-Errors-tf2396951.html#a6684878
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

More information about the Haskell-Cafe mailing list