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:
d78bbf9
)
Fix the type sanity test in genprimopcode's Syntax.hs
2010-11-18
author
Ian Lynagh
<igloo@earth.li>
Wed, 17 Nov 2010 16:30:31 +0000
(16:30 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Wed, 17 Nov 2010 16:30:31 +0000
(16:30 +0000)
We assume this is what it's supposed to be checking. Certainly the old
test (t2 == t2) can't be right.
Spotted by Andres Loeh.
utils/genprimopcode/Syntax.hs
patch
|
blob
|
history
diff --git
a/utils/genprimopcode/Syntax.hs
b/utils/genprimopcode/Syntax.hs
index
64e7875
..
8094670
100644
(file)
--- a/
utils/genprimopcode/Syntax.hs
+++ b/
utils/genprimopcode/Syntax.hs
@@
-109,8
+109,8
@@
sane_ty Compare (TyF t1 (TyF t2 td))
| t1 == t2 && td == TyApp "Bool" [] = True
sane_ty Monadic (TyF t1 td)
| t1 == td = True
-sane_ty Dyadic (TyF t1 (TyF t2 _))
- | t1 == t2 && t2 == t2 = True
+sane_ty Dyadic (TyF t1 (TyF t2 td))
+ | t1 == td && t2 == td = True
sane_ty GenPrimOp _
= True
sane_ty _ _