To meet Ian's observation below, I propose to replace the
lexical production
newline -> a newline (system dependent)
by
newline -> return linefeed | return | linefeed
which, given maximal munch, will behave decently on
any normal system.
Any objections?
Simon
| -----Original Message-----
| From: Ian Lynagh [mailto:[EMAIL PROTECTED]]
| The report says
|
| whitechar -> newline | return | linefeed | vertab | formfeed
| | space | tab | uniWhite
| newline -> a newline (system dependent)
| return -> a carriage return
| linefeed -> a line feed
|
| so, if your system defines a newline to be a line feed, an
| implementation is free to choose whether to lex a line feed
| as a whitechar or a newline, which makes quite a difference
| when you consider the layout rule!
|
| newline can't be arbitrarily determined by the system -
| certainly "x" or "let" would not be acceptable - and having
| it system dependent means that Haskell scripts are not
| portable between different systems. I haven't looked but I
| would be surprised if current implementations behaved
| differently on different platforms - I assume they all look
| for something matching (<CR><LF>?)|<LF> everywhere.
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell