import HsCore
import Literal ( Literal(..), mkMachInt, mkMachInt64, mkMachWord, mkMachWord64 )
import BasicTypes ( Fixity(..), FixityDirection(..), StrictnessMark(..),
- NewOrData(..), Version, initialVersion, Boxity(..)
+ NewOrData(..), Version, initialVersion, Boxity(..),
+ Activation(..)
)
import CostCentre ( CostCentre(..), IsCafCC(..), IsDupdCC(..) )
import Type ( Kind, mkArrowKind, liftedTypeKind, openTypeKind, usageTypeKind )
'__A' { ITarity }
'__P' { ITspecialise }
'__C' { ITnocaf }
- '__U' { ITunfold $$ }
+ '__U' { ITunfold }
'__S' { ITstrict $$ }
'__R' { ITrules }
'__M' { ITcprinfo }
| rule ';' rules { $1:$3 }
rule :: { RdrNameRuleDecl }
-rule : src_loc STRING rule_forall qvar_name
- core_args '=' core_expr { IfaceRule $2 $3 $4 $5 $7 $1 }
+rule : src_loc STRING activation rule_forall qvar_name
+ core_args '=' core_expr { IfaceRule $2 $3 $4 $5 $6 $8 $1 }
+
+activation :: { Activation }
+activation : {- empty -} { AlwaysActive }
+ | INTEGER { ActiveAfter (fromInteger $1) }
rule_forall :: { [UfBinder RdrName] }
rule_forall : '__forall' '{' core_bndrs '}' { $3 }
| '__P' qvar_name INTEGER { HsWorker $2 (fromInteger $3) }
inline_prag :: { InlinePragInfo }
- : {- empty -} { NoInlinePragInfo }
- | '[' from_prag phase ']' { IMustNotBeINLINEd $2 $3 }
-
-from_prag :: { Bool }
- : {- empty -} { True }
- | '!' { False }
-
-phase :: { Maybe Int }
- : {- empty -} { Nothing }
- | INTEGER { Just (fromInteger $1) }
+ : {- empty -} { AlwaysActive }
+ | '[' INTEGER ']' { ActiveAfter (fromInteger $2) }
-------------------------------------------------------
core_expr :: { UfExpr RdrName }