Comment Syntax

Henrik Nilsson nhn at Cs.Nott.AC.UK
Wed Feb 1 21:18:11 EST 2006

Hi all,

To corroborate Wadler's law further.

Josef wrote:

 > Oh yes, it does happen that a single line comment begins with a
 > special symbol. It has happened to me on several occations when using
 > haddock annotation to my source code. It is all to easy to forget that
 > extra space. With incomprehensible error messages as a result.

But might that not just mean that the error messages ought to be

I don't know how hard that would be, but after having played around
a bit with GHC, the messages I get are either of the type
"parse error on input '--|'" or of the type "Not in scope: `-->'"
(followed by lots of other stuff not being in scope etc).

If this really is a big problem for beginners, it would not seem
totally infeasible to add some special code that helpfully suggests
that a space perhaps ought to be inserted?

Or have you seen significantly worse error messages?



Henrik Nilsson
School of Computer Science and Information Technology
The University of Nottingham
nhn at

This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

More information about the Haskell-prime mailing list