From: simonpj Date: Tue, 19 Dec 2000 08:37:18 +0000 (+0000) Subject: [project @ 2000-12-19 08:37:18 by simonpj] X-Git-Tag: Approximately_9120_patches~3068 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=373dd3e08a954f551b8fea7e342e7f056eff319a;p=ghc-hetmet.git [project @ 2000-12-19 08:37:18 by simonpj] Use classesOfPreds instead of DIY --- diff --git a/ghc/compiler/typecheck/Inst.lhs b/ghc/compiler/typecheck/Inst.lhs index 6342259..d0d44cf 100644 --- a/ghc/compiler/typecheck/Inst.lhs +++ b/ghc/compiler/typecheck/Inst.lhs @@ -60,7 +60,7 @@ import PprType ( pprPred ) import Type ( Type, PredType(..), isTyVarTy, mkDictTy, mkPredTy, splitForAllTys, splitSigmaTy, funArgTy, - splitMethodTy, splitRhoTy, + splitMethodTy, splitRhoTy, classesOfPreds, tyVarsOfType, tyVarsOfTypes, tyVarsOfPred, tidyOpenType, tidyOpenTypes ) @@ -724,7 +724,7 @@ lookupSimpleInst clas tys -> 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}