[GHC] #2032: SCC annotations cause compile errors
GHC
trac at galois.com
Thu Jan 10 11:57:04 EST 2008
#2032: SCC annotations cause compile errors
----------------------+-----------------------------------------------------
Reporter: m4dc4p | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.2
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Windows |
----------------------+-----------------------------------------------------
Comment (by simonpj):
Tricky. Do you expect it to parse as:
{{{
take 10 . ({-# SCC "foo" #-} (drop 10 $ s)
}}}
(ie SCC binds less tightly than anything); or
{{{
take 10 . ({-# SCC "foo" #-} (drop 10)) $ s
}}}
(ie SCC binds more tightly than $ but less tightly than appilcation); or
{{{
take 10 . ({-# SCC "foo" #-} drop) 10 $ s
}}}
(ie SCC binds more tightly than anything, including application).
You expected the middle case. GHC is parsing it as the first case. It
isn't clear (to me) which of the three is "right".
As usual, the way to avoid parsing ambiguities is to add parens.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2032#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list