Just to confirm,

What is the official handling of:

> main = putStr " ---------- Hello World ---------------- "

and 

> main = putStr " {- this is not a comment -} "


-Alex-

On Mon, 23 Nov 1998, Simon Peyton-Jones wrote:

> > I REALLY dislike the idea of having my comments lexed.  Can't we leave
> > this part of the language spec alone?
> 
> OK, ok, ok.  I am suitably berated and I yield.
> 
> *  Comments *start* with a lexeme, as previously discussed, and I think
>    this is fine.
> 
> *  The opening lexeme may be '--', '---' etc for ordinary comments, or
>    '{-' for nested comments
> 
> * Note that '{--' is not a lexeme at all, so the maximal munch rule won't
>   munch it.  Hence '{--' lexes as '{-' followed by stuff; it does start 
>   a nested comment.
> 
> * Nested comments are closed, as in all earlier Haskells, by character by
>   character matching for -}.  (Modulo nesting, as now.)
> 
> 
> OK?
> 
> Simon
>       
> 

___________________________________________________________________
S. Alexander Jacobson                   i2x Media  
1-212-697-0184 voice                    1-212-697-1427 fax



Reply via email to