'label' { ITlabel }
'dynamic' { ITdynamic }
'unsafe' { ITunsafe }
+ 'with' { ITwith }
'__interface' { ITinterface } -- interface keywords
'__export' { IT__export }
-----------------------------------------------------------------------------
-rules_and_deprecs :: { ([RdrNameRuleDecl], [(Maybe FAST_STRING, FAST_STRING)]) }
+rules_and_deprecs :: { ([RdrNameRuleDecl], [RdrNameDeprecation]) }
rules_and_deprecs : {- empty -} { ([], []) }
| rules_and_deprecs rule_or_deprec
{ let
in append2 $1 $2
}
-rule_or_deprec :: { ([RdrNameRuleDecl], [(Maybe FAST_STRING, FAST_STRING)]) }
+rule_or_deprec :: { ([RdrNameRuleDecl], [RdrNameDeprecation]) }
rule_or_deprec : pragma { case $1 of
POk _ (PRules rules) -> (rules,[])
POk _ (PDeprecs deprecs) -> ([],deprecs)
-----------------------------------------------------------------------------
-deprecs :: { [(Maybe FAST_STRING, FAST_STRING)] }
+deprecs :: { [RdrNameDeprecation] }
deprecs : {- empty -} { [] }
- | deprecs ';' deprec { $3 : $1 }
+ | deprecs deprec ';' { $2 : $1 }
-deprec :: { (Maybe FAST_STRING, FAST_STRING) }
-deprec : STRING { (Nothing, $1) }
- | deprec_name STRING { (Just $1, $2) }
+deprec :: { RdrNameDeprecation }
+deprec : STRING { Deprecation (IEModuleContents undefined) $1 }
+ | deprec_name STRING { Deprecation $1 $2 }
-deprec_name :: { FAST_STRING }
- : var_fs { $1 }
- | tc_fs { $1 }
+-- SUP: TEMPORARY HACK
+deprec_name :: { RdrNameIE }
+ : var_name { IEVar $1 }
+ | data_name { IEThingAbs $1 }
-----------------------------------------------------------------------------
| 'label' { SLIT("label") }
| 'dynamic' { SLIT("dynamic") }
| 'unsafe' { SLIT("unsafe") }
+ | 'with' { SLIT("with") }
qvar_fs :: { (EncodedFS, EncodedFS) }
: QVARID { $1 }
| PIdInfo [HsIdInfo RdrName]
| PType RdrNameHsType
| PRules [RdrNameRuleDecl]
- | PDeprecs [(Maybe FAST_STRING, FAST_STRING)]
+ | PDeprecs [RdrNameDeprecation]
mkConDecl name (ex_tvs, ex_ctxt) details loc = ConDecl name ex_tvs ex_ctxt details loc
}