tyVarsOfInst, tyVarsOfInsts, tyVarsOfLIE,
ipNamesOfInst, ipNamesOfInsts, fdPredsOfInst, fdPredsOfInsts,
- instLoc, getDictClassTys, dictPred,
+ getDictClassTys, dictPred,
lookupSimpleInst, LookupInstResult(..), lookupPred,
tcExtendLocalInstEnv, tcGetInstEnvs, getOverlapFlag,
(tci_wanted imp)
mkImplicTy tvs givens wanteds -- The type of an implication constraint
- = -- pprTrace "mkImplicTy" (ppr givens) $
+ = ASSERT( all isDict givens )
+ -- pprTrace "mkImplicTy" (ppr givens) $
mkForAllTys tvs $
mkPhiTy (map dictPred givens) $
if isSingleton wanteds then
else
mkTupleTy Boxed (length wanteds) (map instType wanteds)
-instLoc inst = tci_loc inst
-
dictPred (Dict {tci_pred = pred}) = pred
dictPred inst = pprPanic "dictPred" (ppr inst)
occ = case pred_ty of
ClassP cls tys -> mkDictOcc (getOccName cls)
IParam ip ty -> getOccName (ipNameName ip)
+ EqPred _ _ -> pprPanic "mkPredName" (ppr pred_ty)
\end{code}
%************************************************************************
-- the LIE. Instead, any Insts needed by the lookup are returned in
-- the LookupInstResult, where they can be further processed by tcSimplify
---------------------- Impliciations ------------------------
+--------------------- Implications ------------------------
lookupSimpleInst (ImplicInst {}) = return NoInstance
--------------------- Methods ------------------------
; return Nothing }
}}
-lookupPred ip_pred = return Nothing
+lookupPred ip_pred = return Nothing -- Implicit parameters
record_dfun_usage dfun_id
= do { hsc_env <- getTopEnv