summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgExtCode.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/codeGen/CgExtCode.hs')
-rw-r--r--compiler/codeGen/CgExtCode.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/codeGen/CgExtCode.hs b/compiler/codeGen/CgExtCode.hs
index c94f23701b..a651319a49 100644
--- a/compiler/codeGen/CgExtCode.hs
+++ b/compiler/codeGen/CgExtCode.hs
@@ -50,6 +50,7 @@ import OldCmm hiding( ClosureTypeInfo(..) )
-- import BasicTypes
import BlockId
+import DynFlags
import FastString
import Module
import UniqFM
@@ -87,6 +88,10 @@ instance Monad ExtFCode where
(>>=) = thenExtFC
return = returnExtFC
+instance HasDynFlags ExtFCode where
+ getDynFlags = EC (\_ d -> do dflags <- getDynFlags
+ return (d, dflags))
+
-- | Takes the variable decarations and imports from the monad
-- and makes an environment, which is looped back into the computation.