projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidy up the handling of wild-card binders, and make Lint check it
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
CoreLint.lhs
diff --git
a/compiler/coreSyn/CoreLint.lhs
b/compiler/coreSyn/CoreLint.lhs
index
0ca5c43
..
428cda8
100644
(file)
--- a/
compiler/coreSyn/CoreLint.lhs
+++ b/
compiler/coreSyn/CoreLint.lhs
@@
-227,7
+227,11
@@
lintCoreExpr (Var var)
= do { checkL (not (var == oneTupleDataConId))
(ptext (sLit "Illegal one-tuple"))
= do { checkL (not (var == oneTupleDataConId))
(ptext (sLit "Illegal one-tuple"))
- ; checkDeadIdOcc var
+ ; checkL (not (var `hasKey` wildCardKey))
+ (ptext (sLit "Occurence of a wild-card binder") <+> ppr var)
+ -- See Note [WildCard binders] in SimplEnv
+
+ ; checkDeadIdOcc var
; var' <- lookupIdInScope var
; return (idType var') }
; var' <- lookupIdInScope var
; return (idType var') }