diff options
author | Ian Lynagh <igloo@earth.li> | 2011-12-19 15:50:47 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-12-19 15:57:22 +0000 |
commit | 06c6d9709fb73cbaf9c0e1da337c5467c2839f0a (patch) | |
tree | 6ceb4241e5b8167d791100f29866447ab6b16ea8 /compiler/codeGen/StgCmmMonad.hs | |
parent | 0c047a8357551b002b76b76859b748fb51f64633 (diff) | |
download | haskell-06c6d9709fb73cbaf9c0e1da337c5467c2839f0a.tar.gz |
Add a class HasDynFlags(getDynFlags)
We no longer have many separate, clashing getDynFlags functions
I've given each GhcMonad its own HasDynFlags instance, rather than
using UndecidableInstances to make a GhcMonad m => HasDynFlags m
instance.
Diffstat (limited to 'compiler/codeGen/StgCmmMonad.hs')
-rw-r--r-- | compiler/codeGen/StgCmmMonad.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/codeGen/StgCmmMonad.hs b/compiler/codeGen/StgCmmMonad.hs index cab0897fe8..71457c530c 100644 --- a/compiler/codeGen/StgCmmMonad.hs +++ b/compiler/codeGen/StgCmmMonad.hs @@ -379,8 +379,8 @@ newUnique = do getInfoDown :: FCode CgInfoDownwards getInfoDown = FCode $ \info_down state -> (info_down,state) -getDynFlags :: FCode DynFlags -getDynFlags = liftM cgd_dflags getInfoDown +instance HasDynFlags FCode where + getDynFlags = liftM cgd_dflags getInfoDown getThisPackage :: FCode PackageId getThisPackage = liftM thisPackage getDynFlags |