X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcRnMonad.lhs;h=845bdd4e47a02851f20c3b72fd2eabd8a2dccb32;hb=f7e8044f26652537e9b87c4481a45cdfb1bafb8a;hp=a4032cd16a591babab2a43b7d46fdaa06b0f442b;hpb=ca49225cd41123ab6ce229040a93cc4b993b190a;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcRnMonad.lhs b/ghc/compiler/typecheck/TcRnMonad.lhs index a4032cd..845bdd4 100644 --- a/ghc/compiler/typecheck/TcRnMonad.lhs +++ b/ghc/compiler/typecheck/TcRnMonad.lhs @@ -373,6 +373,9 @@ dumpOptTcRn flag doc = ifOptM flag (dumpTcRn doc) getModule :: TcRn Module getModule = do { env <- getGblEnv; return (tcg_mod env) } +setModule :: Module -> TcRn a -> TcRn a +setModule mod thing_inside = updGblEnv (\env -> env { tcg_mod = mod }) thing_inside + tcIsHsBoot :: TcRn Bool tcIsHsBoot = do { env <- getGblEnv; return (isHsBoot (tcg_src env)) }