On 12/12/05, Simon Marlow <simonmar@microsoft.com> wrote:
This looks like a mistake in the syntax. I think GHC is following the letter of the spec, but I also think that the intended behaviour was to admit --: as a varsym, i.e. Hugs' behaviour.
I agree. I suggest modifying the "comment" production to read: comment -> dashes [ any<symbol | :> {any}] newline
I'm not aware of maximal munch being applied only to non-whitespace; does it say so anywhere in the report?
Yes, from section 2.2:
Lexical analysis should use the "maximal munch" rule: at each point, the longest possible lexeme satisfying the lexeme production is read.
Since the "whitespace" production is not included as part of the "lexeme" production, maximal munch must not apply to comments. -- Taral <taralx@gmail.com> "Computer science is no more about computers than astronomy is about telescopes." -- Edsger Dijkstra