Comment Syntax

Josef Svenningsson josef.svenningsson at gmail.com
Thu Feb 2 05:17:39 EST 2006


On 2/2/06, Henrik Nilsson <nhn at cs.nott.ac.uk> wrote:
>
> 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
> improved?
>
> 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?


My point here was not that the error messages was that terrible.  I just
wanted to point out to Manuel that it does happen that single line comments
start with a symbol. Which makes the current comment syntax somewhat
awkward.

Cheers,

/Josef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/haskell-prime/attachments/20060202/0bc02106/attachment.htm


More information about the Haskell-prime mailing list