From 6bb56d7edb05abf5d73872218b49101e15ed6209 Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 2 Nov 2001 14:40:24 +0000 Subject: [PATCH] [project @ 2001-11-02 14:40:24 by simonpj] Fix a STG lint bug --- ghc/compiler/stgSyn/StgLint.lhs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/stgSyn/StgLint.lhs b/ghc/compiler/stgSyn/StgLint.lhs index b36c5b0..af593eb 100644 --- a/ghc/compiler/stgSyn/StgLint.lhs +++ b/ghc/compiler/stgSyn/StgLint.lhs @@ -22,7 +22,7 @@ import ErrUtils ( ErrMsg, Message, addErrLocHdrLine, pprBagOfErrors, dontAddErr import Type ( mkFunTys, splitFunTys, splitTyConApp_maybe, isUnLiftedType, isTyVarTy, splitForAllTys, Type ) -import TyCon ( TyCon, isDataTyCon, tyConDataCons ) +import TyCon ( TyCon, isAlgTyCon, isNewTyCon, tyConDataCons ) import Util ( zipEqual, equalLength ) import Outputable @@ -254,7 +254,8 @@ lintStgAlts alts scrut_ty lintAlgAlt scrut_ty (con, args, _, rhs) = (case splitTyConApp_maybe scrut_ty of - Just (tycon, tys_applied) | isDataTyCon tycon -> + Just (tycon, tys_applied) | isAlgTyCon tycon && + not (isNewTyCon tycon) -> let cons = tyConDataCons tycon arg_tys = dataConArgTys con tys_applied -- 1.7.10.4