X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FInst.lhs;h=8db1aebe8a7070f4a23d3b30ea476b78e6100267;hp=bbdf21bc3c06cee114db649147e37567899edd0d;hb=3391a03562d4056de7b16cd0f632e6c43ae44cca;hpb=27310213397bb89555bb03585e057ba1b017e895 diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index bbdf21b..8db1aeb 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -46,17 +46,17 @@ import TcMType import TcType import Class import Unify -import Coercion import HscTypes import Id import Name -import Var +import Var ( Var, TyVar, EvVar, varType, setVarType ) import VarEnv import VarSet import PrelNames import SrcLoc import DynFlags import Bag +import BasicTypes import Maybes import Util import Outputable @@ -212,11 +212,8 @@ instCallConstraints _ [] = return idHsWrapper instCallConstraints origin (EqPred ty1 ty2 : preds) -- Try short-cut = do { traceTc "instCallConstraints" $ ppr (EqPred ty1 ty2) - ; coi <- unifyType ty1 ty2 + ; co <- unifyType ty1 ty2 ; co_fn <- instCallConstraints origin preds - ; let co = case coi of - IdCo ty -> ty - ACo co -> co ; return (co_fn <.> WpEvApp (EvCoercion co)) } instCallConstraints origin (pred : preds) @@ -280,7 +277,7 @@ mkOverLit (HsIntegral i) mkOverLit (HsFractional r) = do { rat_ty <- tcMetaTy rationalTyConName - ; return (HsRat r rat_ty) } + ; return (HsRat (fl_value r) rat_ty) } mkOverLit (HsIsString s) = return (HsString s) \end{code} @@ -605,4 +602,4 @@ substSkolemInfo :: TvSubst -> SkolemInfo -> SkolemInfo substSkolemInfo subst (SigSkol cx ty) = SigSkol cx (substTy subst ty) substSkolemInfo subst (InferSkol ids) = InferSkol (mapSnd (substTy subst) ids) substSkolemInfo _ info = info -\end{code} \ No newline at end of file +\end{code}