projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
eee2ba2
)
[project @ 2003-06-02 13:27:53 by simonpj]
author
simonpj
<unknown>
Mon, 2 Jun 2003 13:27:53 +0000
(13:27 +0000)
committer
simonpj
<unknown>
Mon, 2 Jun 2003 13:27:53 +0000
(13:27 +0000)
Add comments
ghc/compiler/typecheck/TcIfaceSig.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/typecheck/TcIfaceSig.lhs
b/ghc/compiler/typecheck/TcIfaceSig.lhs
index
e1d3230
..
5295fec
100644
(file)
--- a/
ghc/compiler/typecheck/TcIfaceSig.lhs
+++ b/
ghc/compiler/typecheck/TcIfaceSig.lhs
@@
-55,8
+55,20
@@
signatures.
tcInterfaceSigs :: [RenamedTyClDecl] -- Ignore non-sig-decls in these decls
-> TcM TcGblEnv
tcInterfaceSigs :: [RenamedTyClDecl] -- Ignore non-sig-decls in these decls
-> TcM TcGblEnv
+-- May 2003:
+-- NOTE 1: careful about the side-effected EPS
+-- in the two tcExtendGlobalValueEnv calls
+-- NOTE 2: no point in tying the knot with fixM; all
+-- the important knot-tying comes via the PCS global variable
+
tcInterfaceSigs decls =
zapEnv (fixM (tc_interface_sigs decls)) `thenM` \ (_,sig_ids) ->
tcInterfaceSigs decls =
zapEnv (fixM (tc_interface_sigs decls)) `thenM` \ (_,sig_ids) ->
+ -- The zapEnv dramatically trims the environment, solely
+ -- to plug the space leak that would otherwise be caused
+ -- by a rich environment bound into lots of lazy thunks
+ -- The thunks are the lazily-typechecked IdInfo of the
+ -- imported things.
+
tcExtendGlobalValEnv sig_ids getGblEnv `thenM` \ gbl_env ->
returnM gbl_env
-- We tie a knot so that the Ids read out of interfaces are in scope
tcExtendGlobalValEnv sig_ids getGblEnv `thenM` \ gbl_env ->
returnM gbl_env
-- We tie a knot so that the Ids read out of interfaces are in scope