[commit: ghc] master: Extend parser to allow specification of RULES that never fire. #7162 (779f10f)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/779f10fdedbeeb31891f3f3772cbc2dfdd32e1ee

>---------------------------------------------------------------

commit 779f10fdedbeeb31891f3f3772cbc2dfdd32e1ee
Author: Andrew Farmer <[email protected]>
Date:   Thu Oct 4 16:51:28 2012 -0500

    Extend parser to allow specification of RULES that never fire. #7162

>---------------------------------------------------------------

 compiler/parser/Parser.y.pp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index 3029930..a7a327a 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -882,6 +882,7 @@ activation :: { Maybe Activation }
 explicit_activation :: { Activation }  -- In brackets
         : '[' INTEGER ']'               { ActiveAfter  (fromInteger (getINTEGER $2)) }
         | '[' '~' INTEGER ']'           { ActiveBefore (fromInteger (getINTEGER $3)) }
+	| '[' '~' ']'                   { NeverActive }
 
 rule_forall :: { [RuleBndr RdrName] }
         : 'forall' rule_var_list '.'            { $2 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.