#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 Isaac Dupree):
IMHO expression-pragmas should have a standard precedence that people will
know what it is... I would tend towards "function application"
{{{
take 10 . {-# SCC "foo" #-} drop 10 $ s
}}}
becomes
{{{
take 10 . ({-# SCC "foo" #-} drop) 10 $ s
}}}
but
{{{
take 10 . drop {-# SCC "foo" #-} 10 $ s
}}}
becomes
{{{
take 10 . (drop {-# SCC "foo" #-}) 10 $ s
}}}
which is an error of course. (except that pragmas shouldn't produce fatal
errors, so it should be a warning. Isn't that how pragmas are supposed to
work? Otherwise things tend to break between different compilers, e.g. I
heard rumors about INLINE in `hbc`)
Anyway with "function application" precedence it's just like the GHC-
specific "inline"
{{{
take 10 . inline drop 10 $ s
}}}
... why isn't it a pragma too? such as
{{{
take 10 . {-# INLINE #-} drop 10 $ s
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2032#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs