From 372a8c47e84ee0de43e9e03d5becb8276a4e148c Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 15 Sep 2010 22:32:05 +0000 Subject: [PATCH] Use mkAppTy Using AppTy in CoreLint was giving a bogus Lint failure --- compiler/coreSyn/CoreLint.lhs | 2 +- compiler/types/FamInstEnv.lhs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs index 119b232..c32a3a3 100644 --- a/compiler/coreSyn/CoreLint.lhs +++ b/compiler/coreSyn/CoreLint.lhs @@ -615,7 +615,7 @@ lintCoercion ty@(AppTy ty1 ty2) = do { (s1,t1) <- lintCoercion ty1 ; (s2,t2) <- lintCoercion ty2 ; check_co_app ty (typeKind s1) [s2] - ; return (AppTy s1 s2, AppTy t1 t2) } + ; return (mkAppTy s1 s2, mkAppTy t1 t2) } lintCoercion ty@(FunTy ty1 ty2) = do { (s1,t1) <- lintCoercion ty1 diff --git a/compiler/types/FamInstEnv.lhs b/compiler/types/FamInstEnv.lhs index 7f698de..f6e76a7 100644 --- a/compiler/types/FamInstEnv.lhs +++ b/compiler/types/FamInstEnv.lhs @@ -476,11 +476,11 @@ normaliseType env (TyConApp tc tys) normaliseType env (AppTy ty1 ty2) = let (coi1,nty1) = normaliseType env ty1 (coi2,nty2) = normaliseType env ty2 - in (mkAppTyCoI coi1 coi2, AppTy nty1 nty2) + in (mkAppTyCoI coi1 coi2, mkAppTy nty1 nty2) normaliseType env (FunTy ty1 ty2) = let (coi1,nty1) = normaliseType env ty1 (coi2,nty2) = normaliseType env ty2 - in (mkFunTyCoI coi1 coi2, FunTy nty1 nty2) + in (mkFunTyCoI coi1 coi2, mkFunTy nty1 nty2) normaliseType env (ForAllTy tyvar ty1) = let (coi,nty1) = normaliseType env ty1 in (mkForAllTyCoI tyvar coi, ForAllTy tyvar nty1) -- 1.7.10.4