projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-09-11 09:29:22 by simonmar]
[ghc-hetmet.git]
/
ghc
/
compiler
/
rename
/
RnExpr.lhs
diff --git
a/ghc/compiler/rename/RnExpr.lhs
b/ghc/compiler/rename/RnExpr.lhs
index
e926ef0
..
23e41c0
100644
(file)
--- a/
ghc/compiler/rename/RnExpr.lhs
+++ b/
ghc/compiler/rename/RnExpr.lhs
@@
-162,7
+162,9
@@
rnExpr (HsVar v)
= lookupOccRn v `thenM` \ name ->
if name `hasKey` assertIdKey && not opt_IgnoreAsserts then
-- We expand it to (GHC.Err.assertError location_string)
= lookupOccRn v `thenM` \ name ->
if name `hasKey` assertIdKey && not opt_IgnoreAsserts then
-- We expand it to (GHC.Err.assertError location_string)
- mkAssertErrorExpr
+ mkAssertErrorExpr `thenM` \ (e, fvs) ->
+ returnM (e, fvs `addOneFV` name)
+ -- Keep 'assert' as a free var, to ensure it's not reported as unused!
else
-- The normal case. Even if the Id was 'assert', if we are
-- ignoring assertions we leave it as GHC.Base.assert;
else
-- The normal case. Even if the Id was 'assert', if we are
-- ignoring assertions we leave it as GHC.Base.assert;
@@
-483,6
+485,8
@@
rnCmdTop (HsCmdTop cmd _ _ _)
convertOpFormsCmd :: HsCmd id -> HsCmd id
convertOpFormsCmd :: HsCmd id -> HsCmd id
+convertOpFormsCmd (HsApp c e) = HsApp (convertOpFormsCmd c) e
+
convertOpFormsCmd (HsLam match) = HsLam (convertOpFormsMatch match)
convertOpFormsCmd (OpApp c1 op fixity c2)
convertOpFormsCmd (HsLam match) = HsLam (convertOpFormsMatch match)
convertOpFormsCmd (OpApp c1 op fixity c2)
@@
-555,6
+559,8
@@
methodNamesCmd (HsLet b c) = methodNamesCmd c
methodNamesCmd (HsDo sc stmts rbs ty loc) = methodNamesStmts stmts
methodNamesCmd (HsDo sc stmts rbs ty loc) = methodNamesStmts stmts
+methodNamesCmd (HsApp c e) = methodNamesCmd c
+
methodNamesCmd (HsLam match) = methodNamesMatch match
methodNamesCmd (HsCase scrut matches loc)
methodNamesCmd (HsLam match) = methodNamesMatch match
methodNamesCmd (HsCase scrut matches loc)