Alastair writes:
> > According to the Haskell98 report, section 2.3:
> > `For example, "-->" or "--|" do not begin a comment.'
>  
> I hope it will be a long time because fixing this bug will break my
> habit of separating major pieces of code with "comments" like:
>  
> ----------------------------------------------------------------
> -- Parser
> ----------------------------------------------------------------

Fortunately, Haskell 98 explicitly allows this style of comment,
so nothing will break for you!  You can also have

  --Parser
  --(Parser)
  --"Parser"
  --]Parser[

and those are all still comments as well.

[ The rule is that any lexeme consisting of a sequence of symbol chars
  is acceptable as a varsym, provided it doesn't consist solely of
  two-or-more dashes (in which case it begins a comment).  An important
  point to note is that a lexeme starting with a symbol char must contain
  only symbol chars, and is terminated by the first non-symbol char.

  For lexing purposes, the available symbol chars are
     ! # $ % & * + . / < = > ? @ \ ^ | ~ : -
  plus any Unicode symbols or punctuation.  The following characters are
  "special"s, not symbols
     ( ) , [ ] { } ; " ' `
]

Regards,
    Malcolm

Reply via email to