X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcEnv.lhs;h=f1d14a5c9589b8508150f16959e842aa75c2b7c5;hb=fe58dd2f091f5a4a0e83a5ec6da643a6711e3aed;hp=4b5730b449a3a92965651e5a32ae05f5be285e59;hpb=a3bab0506498db41853543558c52a4fda0d183af;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcEnv.lhs b/compiler/typecheck/TcEnv.lhs index 4b5730b..f1d14a5 100644 --- a/compiler/typecheck/TcEnv.lhs +++ b/compiler/typecheck/TcEnv.lhs @@ -203,6 +203,7 @@ tcLookupFamInst tycon tys = do { env <- getGblEnv ; eps <- getEps ; let instEnv = (eps_fam_inst_env eps, tcg_fam_inst_env env) + ; traceTc "lookupFamInst" ((ppr tycon <+> ppr tys) $$ ppr instEnv) ; case lookupFamInstEnv instEnv tycon tys of [] -> return Nothing ((fam_inst, rep_tys):_) @@ -625,7 +626,8 @@ data InstBindings a -- witness dictionary is identical to the argument -- dictionary. Hence no bindings, no pragmas. - CoercionI -- The coercion maps from newtype to the representation type + -- BAY* : should this be a CoAxiom? + Coercion -- The coercion maps from newtype to the representation type -- (mentioning type variables bound by the forall'd iSpec variables) -- E.g. newtype instance N [a] = N1 (Tree a) -- co : N [a] ~ Tree a @@ -637,7 +639,13 @@ data InstBindings a -- in TcDeriv pprInstInfo :: InstInfo a -> SDoc -pprInstInfo info = vcat [ptext (sLit "InstInfo:") <+> ppr (idType (iDFunId info))] +pprInstInfo info = hang (ptext (sLit "instance")) + 2 (sep [ ifPprDebug (pprForAll tvs) + , pprThetaArrowTy theta, ppr tau + , ptext (sLit "where")]) + where + (tvs, theta, tau) = tcSplitSigmaTy (idType (iDFunId info)) + pprInstInfoDetails :: OutputableBndr a => InstInfo a -> SDoc pprInstInfoDetails info = pprInstInfo info $$ nest 2 (details (iBinds info))