X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcPat.lhs;h=4d1a49d73d6b6c464aa6f466e8b432a2f1fd8d9e;hb=aa143d21f5dfbcbda4d5c032d5c3db4ed6b10e7a;hp=e6c6949423b1e58c6f2f4190ff7a0f18ff1be971;hpb=51a571c0f5b0201ea53bec60fcaafb78c01c017e;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcPat.lhs b/ghc/compiler/typecheck/TcPat.lhs index e6c6949..4d1a49d 100644 --- a/ghc/compiler/typecheck/TcPat.lhs +++ b/ghc/compiler/typecheck/TcPat.lhs @@ -15,7 +15,7 @@ import TcHsSyn ( TcPat, TcId ) import TcMonad import Inst ( InstOrigin(..), emptyLIE, plusLIE, LIE, mkLIE, unitLIE, instToId, - newMethod, newOverloadedLit, newDicts, newClassDicts + newMethod, newOverloadedLit, newDicts ) import Id ( mkLocalId ) import Name ( Name ) @@ -30,7 +30,7 @@ import DataCon ( dataConSig, dataConFieldLabels, dataConSourceArity ) import Type ( isTauTy, mkTyConApp, mkClassPred, liftedTypeKind ) -import Subst ( substTy, substClasses ) +import Subst ( substTy, substTheta ) import TysPrim ( charPrimTy, intPrimTy, floatPrimTy, doublePrimTy, addrPrimTy ) @@ -372,14 +372,14 @@ tcConstructor pat con_name pat_ty in tcInstTyVars (ex_tvs ++ tvs) `thenNF_Tc` \ (all_tvs', ty_args', tenv) -> let - ex_theta' = substClasses tenv ex_theta + ex_theta' = substTheta tenv ex_theta arg_tys' = map (substTy tenv) arg_tys n_ex_tvs = length ex_tvs ex_tvs' = take n_ex_tvs all_tvs' result_ty = mkTyConApp tycon (drop n_ex_tvs ty_args') in - newClassDicts (PatOrigin pat) ex_theta' `thenNF_Tc` \ dicts -> + newDicts (PatOrigin pat) ex_theta' `thenNF_Tc` \ dicts -> -- Check overall type matches unifyTauTy pat_ty result_ty `thenTc_`