Skip to content

GHC allows sections with out parenthesis in tuples

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.

Trac metadata
Trac field Value
Version 6.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information