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:
0f5e104
)
CoreLint should check for out-of-scope worker
author
simonpj@microsoft.com
<unknown>
Sat, 14 Jun 2008 02:38:09 +0000
(
02:38
+0000)
committer
simonpj@microsoft.com
<unknown>
Sat, 14 Jun 2008 02:38:09 +0000
(
02:38
+0000)
compiler/coreSyn/CoreLint.lhs
patch
|
blob
|
history
diff --git
a/compiler/coreSyn/CoreLint.lhs
b/compiler/coreSyn/CoreLint.lhs
index
dda78c3
..
8f5538c
100644
(file)
--- a/
compiler/coreSyn/CoreLint.lhs
+++ b/
compiler/coreSyn/CoreLint.lhs
@@
-28,6
+28,7
@@
import VarEnv
import VarSet
import Name
import Id
import VarSet
import Name
import Id
+import IdInfo
import PprCore
import ErrUtils
import SrcLoc
import PprCore
import ErrUtils
import SrcLoc
@@
-227,7
+228,10
@@
lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
where
binder_ty = idType binder
maybeDmdTy = idNewStrictness_maybe binder
where
binder_ty = idType binder
maybeDmdTy = idNewStrictness_maybe binder
- bndr_vars = varSetElems (idFreeVars binder)
+ bndr_vars = varSetElems (idFreeVars binder `unionVarSet` wkr_vars)
+ wkr_vars | workerExists wkr_info = unitVarSet (workerId wkr_info)
+ | otherwise = emptyVarSet
+ wkr_info = idWorkerInfo binder
lintBinder var | isId var = lintIdBndr var $ \_ -> (return ())
| otherwise = return ()
\end{code}
lintBinder var | isId var = lintIdBndr var $ \_ -> (return ())
| otherwise = return ()
\end{code}