projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
abbb320
)
[project @ 2001-11-02 14:40:24 by simonpj]
author
simonpj
<unknown>
Fri, 2 Nov 2001 14:40:24 +0000
(14:40 +0000)
committer
simonpj
<unknown>
Fri, 2 Nov 2001 14:40:24 +0000
(14:40 +0000)
Fix a STG lint bug
ghc/compiler/stgSyn/StgLint.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/stgSyn/StgLint.lhs
b/ghc/compiler/stgSyn/StgLint.lhs
index
b36c5b0
..
af593eb
100644
(file)
--- 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 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
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
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
let
cons = tyConDataCons tycon
arg_tys = dataConArgTys con tys_applied