Tidy-up sweep, following the Great Skolemisation Simplification
[ghc-hetmet.git] / compiler / typecheck / TcClassDcl.lhs
index 85a9431..839a5a2 100644 (file)
@@ -19,6 +19,7 @@ import RnHsSyn
 import RnExpr
 import Inst
 import InstEnv
+import TcPat( addInlinePrags )
 import TcEnv
 import TcBinds
 import TcUnify
@@ -34,7 +35,6 @@ import MkId
 import Id
 import Name
 import Var
-import VarSet
 import NameEnv
 import NameSet
 import Outputable
@@ -216,9 +216,10 @@ tcDefMeth clas tyvars this_dict binds_in sig_fn prag_fn (sel_id, dm_info)
              dm_id         = mkDefaultMethodId sel_id dm_name
              local_dm_type = instantiateMethod clas sel_id (mkTyVarTys tyvars)
              local_dm_id   = mkLocalId local_dm_name local_dm_type
+              prags         = prag_fn sel_name
 
-        ; (dm_id_w_inline, spec_prags) 
-                <- tcPrags NonRecursive False True dm_id (prag_fn sel_name)
+        ; dm_id_w_inline <- addInlinePrags dm_id prags
+        ; spec_prags     <- tcSpecPrags dm_id prags
 
         ; warnTc (not (null spec_prags))
                  (ptext (sLit "Ignoring SPECIALISE pragmas on default method") 
@@ -253,7 +254,7 @@ tcInstanceMethodBody skol_info tyvars dfun_ev_vars
                             -- NB: the binding is always a FunBind
 
        ; (ev_binds, (tc_bind, _)) 
-               <- checkConstraints skol_info emptyVarSet tyvars full_given $
+               <- checkConstraints skol_info tyvars full_given $
                  tcExtendIdEnv [local_meth_id] $
                  tcPolyBinds TopLevel meth_sig_fn no_prag_fn 
                             NonRecursive NonRecursive