[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe]  A useful trick for inclusion and exclusion of
From:       Sven Panne <Sven.Panne () aedion ! de>
Date:       2004-04-12 11:34:19
Message-ID: 407A7EBB.8060402 () aedion ! de
[Download RAW message or body]

Wolfgang Jeltsch wrote:
> does this trick also work with GHC?  I think that GHC needs a space after -- 
> if these two dashes shall introduce an one line comment.

It works with GHC, too, and this conforms to the H98 report, section 9.2
(Lexical Syntax):

    http://haskell.org/onlinereport/syntax-iso.html#sect9.2

The main reason for this to work is that the braces are classified as "special".
If they were classified as "symbol", '--}' would be a "varsym", not the start
of a comment.

Cheers,
    S.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic