Re: Placement of OPTION pragmas

2003-09-19 Thread Sven Panne
Henrik Nilsson wrote: But different people may have different opinions [...] ... and this is concisely stated in Wadler's Law of Language Design. (http://www.informatik.uni-kiel.de/~mh/curry/listarchive/0017.html :-) Seriously, I don't really care on what we agree here, it's only a minor issue. My

Re: Placement of OPTION pragmas

2003-09-19 Thread Malcolm Wallace
[EMAIL PROTECTED] writes: Moreover, there is only one first line, and assuming some kind of language pragma is introduced, and assuming Simon Marlow goes ahead and introduces GHC_OPTIONS, and the other implementors goes ahead and introduces HUGS_OPTIONS,

RE: Placement of OPTION pragmas

2003-09-19 Thread Simon Marlow
OPTIONS pragmas are only looked for at the top of your source files, upto the first (non-literate,non-empty) line not containing OPTIONS. Why doesn't non-empty include comment-only lines? One concrete reason for this is that the code which looks for '{-# OPTIONS' isn't the full

Re: Placement of OPTION pragmas

2003-09-19 Thread Juanma Barranquero
On Fri, 19 Sep 2003 14:27:19 +0100 Simon Marlow [EMAIL PROTECTED] wrote: We could make it understand comments, but that adds extra complication (nested comments, maximal munch for '--' comments, etc.). Hmm. Nested comments yes, I see how that'd be a problem. But surely it wouldn't be hard

Placement of OPTION pragmas

2003-09-18 Thread Juanma Barranquero
A very small nitpick: OPTIONS pragmas are only looked for at the top of your source files, upto the first (non-literate,non-empty) line not containing OPTIONS. Why doesn't non-empty include comment-only lines? I usually start source files with the equivalent of:

Re: Placement of OPTION pragmas

2003-09-18 Thread Sven Panne
Juanma Barranquero wrote: OPTIONS pragmas are only looked for at the top of your source files, upto the first (non-literate,non-empty) line not containing OPTIONS. Why doesn't non-empty include comment-only lines? I usually start source files with the equivalent of: [...] and currently {-#

Re: Placement of OPTION pragmas

2003-09-18 Thread nilsson
Sven Panne wrote: ... and I think it is fine that way, I would even be happy if it had to be the very first line. OPTIONS can change the language (well, at least in parts), so they should be placed in a prominent place. It would be easy to change GHC's behaviour the way you asked for, but