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-10-09 15:38:22 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
typecheck
/
TcRnDriver.lhs
diff --git
a/ghc/compiler/typecheck/TcRnDriver.lhs
b/ghc/compiler/typecheck/TcRnDriver.lhs
index
20d0d21
..
480b28f
100644
(file)
--- a/
ghc/compiler/typecheck/TcRnDriver.lhs
+++ b/
ghc/compiler/typecheck/TcRnDriver.lhs
@@
-517,9
+517,7
@@
tcRnExtCore hsc_env (HsExtCore this_mod decls src_binds)
-- Deal with the type declarations; first bring their stuff
-- into scope, then rname them, then type check them
-- Deal with the type declarations; first bring their stuff
-- into scope, then rname them, then type check them
- (rdr_env, imports) <- importsFromLocalDecls $
- HsGroup { hs_tyclds = decls, hs_valds = EmptyBinds, hs_fords = [] } ;
- -- Rather clumsy; lots of unused fields
+ (rdr_env, imports) <- importsFromLocalDecls (mkFakeGroup decls) ;
updGblEnv (\gbl -> gbl { tcg_rdr_env = rdr_env `plusGlobalRdrEnv` tcg_rdr_env gbl,
tcg_imports = imports `plusImportAvails` tcg_imports gbl })
updGblEnv (\gbl -> gbl { tcg_rdr_env = rdr_env `plusGlobalRdrEnv` tcg_rdr_env gbl,
tcg_imports = imports `plusImportAvails` tcg_imports gbl })
@@
-570,6
+568,12
@@
tcRnExtCore hsc_env (HsExtCore this_mod decls src_binds)
return mod_guts
}}}}
return mod_guts
}}}}
+
+mkFakeGroup decls -- Rather clumsy; lots of unused fields
+ = HsGroup { hs_tyclds = decls, -- This is the one we want
+ hs_valds = EmptyBinds, hs_fords = [],
+ hs_instds = [], hs_fixds = [], hs_depds = [],
+ hs_ruleds = [] }
\end{code}
\end{code}