X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcInstDcls.lhs;h=a76d87bdf234257b6e15fe8a919a8bca749c13ed;hb=c4c2f7ecc229de0059018aebac1f6a444a382900;hp=e8182aca095bd6616b4708f03e87e2167fe3f035;hpb=0ccc12b6d176efe4a6d605864412deda75b62459;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcInstDcls.lhs b/compiler/typecheck/TcInstDcls.lhs index e8182ac..a76d87b 100644 --- a/compiler/typecheck/TcInstDcls.lhs +++ b/compiler/typecheck/TcInstDcls.lhs @@ -12,6 +12,7 @@ import HsSyn import TcBinds import TcTyClsDecls import TcClassDcl +import TcPat( addInlinePrags ) import TcRnMonad import TcMType import TcType @@ -838,8 +839,9 @@ tcInstanceMethods dfun_id clas tyvars dfun_ev_vars inst_tys = add_meth_ctxt sel_id generated_code rn_bind $ do { (meth_id, local_meth_id) <- mkMethIds clas tyvars dfun_ev_vars inst_tys sel_id - ; (meth_id1, spec_prags) <- tcPrags NonRecursive False True - meth_id (prag_fn (idName sel_id)) + ; let prags = prag_fn (idName sel_id) + ; meth_id1 <- addInlinePrags meth_id prags + ; spec_prags <- tcSpecPrags True meth_id prags ; bind <- tcInstanceMethodBody InstSkol tyvars dfun_ev_vars @@ -1029,7 +1031,7 @@ wrapId wrapper id = mkHsWrap wrapper (HsVar id) derivBindCtxt :: Id -> Class -> [Type ] -> LHsBind Name -> SDoc derivBindCtxt sel_id clas tys _bind - = vcat [ ptext (sLit "When typechecking the code for ") <+> ppr sel_id + = vcat [ ptext (sLit "When typechecking the code for ") <+> quotes (ppr sel_id) , nest 2 (ptext (sLit "in a standalone derived instance for") <+> quotes (pprClassPred clas tys) <> colon) , nest 2 $ ptext (sLit "To see the code I am typechecking, use -ddump-deriv") ]