The first token in "--:\n" is...

a) varsym, because varsym always wins according to section 2.3:

An ordinary comment begins with a sequence of two or more consecutive
dashes (e.g. --) and extends to the following newline. The sequence of
dashes must not form part of a legal lexeme. For example, "-->" or
"|--" do not begin a comment, because both of these are legal lexemes;
however "--foo" does start a comment.

or b) comment, because the maximal munch rule says so (it matches the newline):

comment -> dashes [any<symbol> {any}] newline
varsym -> (symbol {symbol | :})<reservedop | dashes>

GHC says comment. Hugs says varsym. What's the answer?

--
Taral <[EMAIL PROTECTED]>
"Computer science is no more about computers than astronomy is about
telescopes."
    -- Edsger Dijkstra
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to