diff options
Diffstat (limited to 'compiler/utils/IOEnv.hs')
-rw-r--r-- | compiler/utils/IOEnv.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs index ee7e616305..35d7973c04 100644 --- a/compiler/utils/IOEnv.hs +++ b/compiler/utils/IOEnv.hs @@ -32,6 +32,7 @@ module IOEnv ( import DynFlags import Exception +import Module import Panic import Data.IORef ( IORef, newIORef, readIORef, writeIORef, modifyIORef, @@ -93,6 +94,10 @@ instance ContainsDynFlags env => HasDynFlags (IOEnv env) where getDynFlags = do env <- getEnv return $ extractDynFlags env +instance ContainsModule env => HasModule (IOEnv env) where + getModule = do env <- getEnv + return $ extractModule env + ---------------------------------------------------------------------- -- Fundmantal combinators specific to the monad ---------------------------------------------------------------------- |