diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-11-02 14:47:38 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-11-02 15:26:07 +0000 |
commit | fb31191a76b0b623e11aab8486643bc175a8712e (patch) | |
tree | 3ceaa2bba59d6a32b5892e4a2cfaa53b0440ab87 /compiler/utils/IOEnv.hs | |
parent | 0a7c4efe8b7ce459979c0cb18d60910539347f9c (diff) | |
download | haskell-fb31191a76b0b623e11aab8486643bc175a8712e.tar.gz |
Refactoring: Make a HasModule class for getModule
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 ---------------------------------------------------------------------- |