diff options
author | Thomas Schilling <nominolo@googlemail.com> | 2008-10-06 22:28:31 +0000 |
---|---|---|
committer | Thomas Schilling <nominolo@googlemail.com> | 2008-10-06 22:28:31 +0000 |
commit | 1a93895686c5ad0dfd3fd1279a4bd51fd5a3279e (patch) | |
tree | 3b3c6d26ea8b04eaeb5a550ec250600022d4e703 /compiler/ghci | |
parent | 7be8ea9d9f97e6d437aeaeb2aaad39c4c42d3591 (diff) | |
download | haskell-1a93895686c5ad0dfd3fd1279a4bd51fd5a3279e.tar.gz |
Make 'gblock' and 'gunblock' part of 'ExceptionMonad'. This way the
default implementations of 'gbracket' and 'gfinally' just work.
MERGE TO 6.10
Diffstat (limited to 'compiler/ghci')
-rw-r--r-- | compiler/ghci/GhciMonad.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/ghci/GhciMonad.hs b/compiler/ghci/GhciMonad.hs index 0bd484ad79..ef1879dbbd 100644 --- a/compiler/ghci/GhciMonad.hs +++ b/compiler/ghci/GhciMonad.hs @@ -170,12 +170,8 @@ instance GhcMonad GHCi where instance ExceptionMonad GHCi where gcatch m h = GHCi $ \r -> unGHCi m r `gcatch` (\e -> unGHCi (h e) r) - gbracket acq rel ib = - GHCi $ \r -> gbracket (unGHCi acq r) - (\x -> unGHCi (rel x) r) - (\x -> unGHCi (ib x) r) - gfinally th cu = - GHCi $ \r -> gfinally (unGHCi th r) (unGHCi cu r) + gblock (GHCi m) = GHCi $ \r -> gblock (m r) + gunblock (GHCi m) = GHCi $ \r -> gunblock (m r) instance WarnLogMonad GHCi where setWarnings warns = liftGhc $ setWarnings warns |