import CostCentre ( CostCentre(..), IsCafCC(..), IsDupdCC(..) )
import CallConv ( cCallConv )
import Type ( Kind, mkArrowKind, liftedTypeKind, openTypeKind, usageTypeKind )
-import IdInfo ( exactArity, InlinePragInfo(..) )
+import IdInfo ( InlinePragInfo(..) )
import PrimOp ( CCall(..), CCallTarget(..) )
import Lex
loc = $1 }
}
-rules_prag :: { ParseResult ([RdrNameRuleDecl], IfaceDeprecs) }
-rules_prag : src_loc PRAGMA { parseRules $2 PState{ bol = 0#, atbol = 1#,
- context = [],
- glasgow_exts = 1#,
- loc = $1 }
- }
-
-----------------------------------------------------------------------------
rules_and_deprecs_part :: { ([RdrNameRuleDecl], IfaceDeprecs) }
PFailed err -> pprPanic "Rules/Deprecations parse failed" err
}
+rules_prag :: { ParseResult ([RdrNameRuleDecl], IfaceDeprecs) }
+rules_prag : src_loc PRAGMA { parseRules $2 PState{ bol = 0#, atbol = 1#,
+ context = [],
+ glasgow_exts = 1#,
+ loc = $1 }
+ }
+
rules_and_deprecs :: { ([RdrNameRuleDecl], IfaceDeprecs) }
rules_and_deprecs : rule_prag deprec_prag { ($1, $2) }
| class ',' context_list1 { $1 : $3 }
class :: { HsPred RdrName }
-class : qcls_name atypes { (HsPClass $1 $2) }
- | ipvar_name '::' type { (HsPIParam $1 $3) }
+class : qcls_name atypes { (HsClassP $1 $2) }
+ | ipvar_name '::' type { (HsIParam $1 $3) }
types0 :: { [RdrNameHsType] {- Zero or more -} }
types0 : {- empty -} { [ ] }
| id_info_item id_info { $1 : $2 }
id_info_item :: { HsIdInfo RdrName }
- : '__A' INTEGER { HsArity (exactArity (fromInteger $2)) }
+ : '__A' INTEGER { HsArity (fromInteger $2) }
| '__U' inline_prag core_expr { HsUnfold $2 $3 }
| '__M' { HsCprInfo }
| '__S' { HsStrictness (mkStrictnessInfo $1) }
| '__C' { HsNoCafRefs }
- | '__P' qvar_name { HsWorker $2 }
+ | '__P' qvar_name INTEGER { HsWorker $2 (fromInteger $3) }
inline_prag :: { InlinePragInfo }
: {- empty -} { NoInlinePragInfo }