summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcRules.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/typecheck/TcRules.hs')
-rw-r--r--compiler/typecheck/TcRules.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/typecheck/TcRules.hs b/compiler/typecheck/TcRules.hs
index f1d549568a..9b4c38c735 100644
--- a/compiler/typecheck/TcRules.hs
+++ b/compiler/typecheck/TcRules.hs
@@ -69,7 +69,7 @@ tcRuleDecls (HsRules { rds_src = src
; return $ HsRules { rds_ext = noExt
, rds_src = src
, rds_rules = tc_decls } }
-tcRuleDecls (XRuleDecls _) = panic "tcRuleDecls"
+tcRuleDecls (XRuleDecls nec) = noExtCon nec
tcRule :: RuleDecl GhcRn -> TcM (RuleDecl GhcTcId)
tcRule (HsRule { rd_ext = ext
@@ -144,7 +144,7 @@ tcRule (HsRule { rd_ext = ext
, rd_tmvs = map (noLoc . RuleBndr noExt . noLoc) (all_qtkvs ++ tpl_ids)
, rd_lhs = mkHsDictLet lhs_binds lhs'
, rd_rhs = mkHsDictLet rhs_binds rhs' } }
-tcRule (XRuleDecl _) = panic "tcRule"
+tcRule (XRuleDecl nec) = noExtCon nec
generateRuleConstraints :: Maybe [LHsTyVarBndr GhcRn] -> [LRuleBndr GhcRn]
-> LHsExpr GhcRn -> LHsExpr GhcRn
@@ -203,7 +203,7 @@ tcRuleTmBndrs (L _ (RuleBndrSig _ (L _ name) rn_ty) : rule_bndrs)
; (tyvars, tmvars) <- tcExtendNameTyVarEnv tvs $
tcRuleTmBndrs rule_bndrs
; return (map snd tvs ++ tyvars, id : tmvars) }
-tcRuleTmBndrs (L _ (XRuleBndr _) : _) = panic "tcRuleTmBndrs"
+tcRuleTmBndrs (L _ (XRuleBndr nec) : _) = noExtCon nec
ruleCtxt :: FastString -> SDoc
ruleCtxt name = text "When checking the transformation rule" <+>