X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcInstUtil.lhs;h=6853735afdfa05b2b8fa94e7c5a41af26ff7e2d4;hb=0596517a9b4b2b32e5d375a986351102ac4540fc;hp=4e6b72dc653d04d51aee42f69b072657ea2d7bab;hpb=6c381e873e222417d9a67aeec77b9555eca7b7a8;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcInstUtil.lhs b/ghc/compiler/typecheck/TcInstUtil.lhs index 4e6b72d..6853735 100644 --- a/ghc/compiler/typecheck/TcInstUtil.lhs +++ b/ghc/compiler/typecheck/TcInstUtil.lhs @@ -34,7 +34,7 @@ import PprType ( GenClass, GenType, GenTyVar ) import Pretty import SpecEnv ( SpecEnv(..), nullSpecEnv, addOneToSpecEnv ) import SrcLoc ( SrcLoc ) -import Type ( mkSigmaTy, mkForAllTys, mkDictTy, mkTyVarTy, +import Type ( mkSigmaTy, mkForAllTys, mkDictTy, mkTyVarTys, splitForAllTy, instantiateTy, matchTy, ThetaType(..) ) import TyVar ( GenTyVar ) import Unique ( Unique ) @@ -272,9 +272,9 @@ addClassInstance Succeeded spec_env' -> spec_env' ) where (local_tyvars, _) = splitForAllTy (getClassOpLocalType op) - local_tyvar_tys = map mkTyVarTy local_tyvars + local_tyvar_tys = mkTyVarTys local_tyvars rhs = mkValLam [dict] (mkTyApp (mkTyApp (Var meth_id) - (map mkTyVarTy inst_tyvars)) + (mkTyVarTys inst_tyvars)) local_tyvar_tys) in returnTc (class_inst_env', op_spec_envs')