(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
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}
%************************************************************************
returnM (varSetElems qtvs, binds)
else
let
- (non_ips, bad_ips) = partition isClassDict irreds
+ (bad_ips, non_ips) = partition isIPDict irreds
in
addTopIPErrs bndrs bad_ips `thenM_`
extendLIEs non_ips `thenM_`
Just (Rhs rhs ws') -> go (add_given avails w) new_binds irreds (ws' ++ ws)
where
new_binds = addBind binds w rhs
- where
- w_span = instSpan w
- w_id = instToId w
add_given avails w = extendAvailEnv avails w (Given (instToId w))