[GHC] #2490: GHC allows sections with out parenthesis in tuples

GHC trac at galois.com
Tue Aug 5 17:07:36 EDT 2008


#2490: GHC allows sections with out parenthesis in tuples
---------------------------+------------------------------------------------
    Reporter:  JeremyShaw  |       Owner:          
        Type:  bug         |      Status:  new     
    Priority:  normal      |   Component:  Compiler
     Version:  6.8.3       |    Severity:  normal  
    Keywords:              |    Testcase:          
Architecture:  Unknown     |          Os:  Unknown 
---------------------------+------------------------------------------------
 GHC gladly accepts:

 > f x = (`head` x, ())

 but the Haskell 98 Report (section 3.5) seems to indicate that additional
 parens are required, like this:

 > f x = ((`head` x), ())

 It's unclear if this is a bug in GHC, an undocumented feature, or valid
 H98 if you read the report in just the right way.

 Hugs and lambdabot don't like it.

 More importantly, the trhsx preprocessor used by HSX/HSP does not like it.
 So, we are wondering if we should extend trhsx to allow it, and if so,
 what the rules are.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2490>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list