= 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):_)
Bool)) -- True <=> Use extended defaulting rules
tcGetDefaultTys interactive
= do { dflags <- getDOpts
- ; let ovl_strings = dopt Opt_OverloadedStrings dflags
+ ; let ovl_strings = xopt Opt_OverloadedStrings dflags
extended_defaults = interactive
- || dopt Opt_ExtendedDefaultRules dflags
+ || xopt Opt_ExtendedDefaultRules dflags
-- See also Trac #1974
flags = (ovl_strings, extended_defaults)
\begin{code}
data InstInfo a
= InstInfo {
- iSpec :: Instance, -- Includes the dfun id. Its forall'd type
- iBinds :: InstBindings a -- variables scope over the stuff in InstBindings!
+ iSpec :: Instance, -- Includes the dfun id. Its forall'd type
+ iBinds :: InstBindings a -- variables scope over the stuff in InstBindings!
}
iDFunId :: InstInfo a -> DFunId
-- 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)
+ , pprThetaArrow 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))