summaryrefslogtreecommitdiff
path: root/compiler/main/GhcMonad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/GhcMonad.hs')
-rw-r--r--compiler/main/GhcMonad.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/main/GhcMonad.hs b/compiler/main/GhcMonad.hs
index 4c72f144c2..816cc4b922 100644
--- a/compiler/main/GhcMonad.hs
+++ b/compiler/main/GhcMonad.hs
@@ -105,6 +105,9 @@ instance Monad Ghc where
instance MonadIO Ghc where
liftIO ioA = Ghc $ \_ -> ioA
+instance MonadFix Ghc where
+ mfix f = Ghc $ \s -> mfix (\x -> unGhc (f x) s)
+
instance ExceptionMonad Ghc where
gcatch act handle =
Ghc $ \s -> unGhc act s `gcatch` \e -> unGhc (handle e) s