[GHC] #7162: RULES that never fire (automatically)
GHC
cvs-ghc at haskell.org
Tue Dec 4 21:03:41 CET 2012
#7162: RULES that never fire (automatically)
-------------------------------+--------------------------------------------
Reporter: andygill | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
Comment(by afarmer):
So while documenting this, I realized this patch makes an unintended
change. Namely, the INLINE pragma uses the same parser rules for
activation as the RULES pragma. So it is now possible to write:
{-# INLINE [~] ... #-}
and
{-# NOINLINE [~] ... #-}
Looking at RdrHsSyn.lhs, the first case (INLINE [~]) is equivalent to
NOINLINE. Worryingly, I have yet to figure out how the second case
(NOINLINE [~]) behaves.
So as I see it, there are two possible solutions.
1. I submit a new patch to the parser that separates the activation
parsing for RULES and INLINE so RULES [~] is possible but INLINE [~] is
not.
2. I figure out what NOINLINE [~] means and document that.
Opinions? I'm inclined towards option 1, as I think it'll be less
confusing for the user.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7162#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list