Use classesOfPreds instead of DIY
import Type ( Type, PredType(..),
isTyVarTy, mkDictTy, mkPredTy,
splitForAllTys, splitSigmaTy, funArgTy,
import Type ( Type, PredType(..),
isTyVarTy, mkDictTy, mkPredTy,
splitForAllTys, splitSigmaTy, funArgTy,
- splitMethodTy, splitRhoTy,
+ splitMethodTy, splitRhoTy, classesOfPreds,
tyVarsOfType, tyVarsOfTypes, tyVarsOfPred,
tidyOpenType, tidyOpenTypes
)
tyVarsOfType, tyVarsOfTypes, tyVarsOfPred,
tidyOpenType, tidyOpenTypes
)
-> returnNF_Tc (Just (substClasses (mkSubst emptyInScopeSet tenv) theta'))
where
(_, theta, _) = splitSigmaTy (idType dfun)
-> returnNF_Tc (Just (substClasses (mkSubst emptyInScopeSet tenv) theta'))
where
(_, theta, _) = splitSigmaTy (idType dfun)
- theta' = map (\(Class clas tys) -> (clas,tys)) theta
+ theta' = classesOfPreds theta
other -> returnNF_Tc Nothing
\end{code}
other -> returnNF_Tc Nothing
\end{code}