import TcBinds
import TcTyClsDecls
import TcClassDcl
+import TcPat( addInlinePrags )
import TcRnMonad
import TcMType
import TcType
= 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
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") ]