wiki:LineCommentSyntax

Version 3 (modified by simonmar@…, 6 years ago) (diff)

--

Ticket: #42

The comment syntax according to the report is:

  comment  -> dashes [ any<symbol> {any} ] newline

  symbol -> ascSymbol | uniSymbol<special|_|:|"|'>
  ascSymbol -> ... does not include : ...

This unfortunately forces sequences beginning '--:' to be comments, which appears to be unintentional.

Fix:

  comment -> dashes [ any<symbol|:> {any} ] newline

During the committee discussion for Haskell 2010, a better fix was suggested by Ross Paterson, namely to move ':' into symbol instead:

    comment ->      dashes [ any<symbol> {any}] newline
    graphic ->      small | large | symbol | digit | special | " | '
    symbol  ->      ascSymbol | uniSymbol<special | _ | " | '>
    varsym  ->      ( symbol<:> {symbol})<reservedop | dashes>
    consym  ->      (: {symbol})<reservedop>