projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Document the behaviour of fenv.h functions with GHC (#4391)
[ghc-hetmet.git]
/
ghc
/
GhciMonad.hs
diff --git
a/ghc/GhciMonad.hs
b/ghc/GhciMonad.hs
index
82f2aa7
..
863372f
100644
(file)
--- a/
ghc/GhciMonad.hs
+++ b/
ghc/GhciMonad.hs
@@
-191,7
+191,7
@@
instance ExceptionMonad GHCi where
unGHCi (f g_restore) s
instance MonadIO GHCi where
unGHCi (f g_restore) s
instance MonadIO GHCi where
- liftIO = io
+ liftIO = MonadUtils.liftIO
instance Haskeline.MonadException GHCi where
catch = gcatch
instance Haskeline.MonadException GHCi where
catch = gcatch
@@
-233,9
+233,6
@@
unsetOption opt
= do st <- getGHCiState
setGHCiState (st{ options = filter (/= opt) (options st) })
= do st <- getGHCiState
setGHCiState (st{ options = filter (/= opt) (options st) })
-io :: IO a -> GHCi a
-io = MonadUtils.liftIO
-
printForUser :: GhcMonad m => SDoc -> m ()
printForUser doc = do
unqual <- GHC.getPrintUnqual
printForUser :: GhcMonad m => SDoc -> m ()
printForUser doc = do
unqual <- GHC.getPrintUnqual
@@
-244,7
+241,7
@@
printForUser doc = do
printForUserPartWay :: SDoc -> GHCi ()
printForUserPartWay doc = do
unqual <- GHC.getPrintUnqual
printForUserPartWay :: SDoc -> GHCi ()
printForUserPartWay doc = do
unqual <- GHC.getPrintUnqual
- io $ Outputable.printForUserPartWay stdout opt_PprUserLength unqual doc
+ liftIO $ Outputable.printForUserPartWay stdout opt_PprUserLength unqual doc
runStmt :: String -> GHC.SingleStep -> GHCi GHC.RunResult
runStmt expr step = do
runStmt :: String -> GHC.SingleStep -> GHCi GHC.RunResult
runStmt expr step = do
@@
-299,9
+296,9
@@
printTimes allocs psecs
revertCAFs :: GHCi ()
revertCAFs = do
revertCAFs :: GHCi ()
revertCAFs = do
- io $ rts_revertCAFs
+ liftIO rts_revertCAFs
s <- getGHCiState
s <- getGHCiState
- when (not (ghc_e s)) $ io turnOffBuffering
+ when (not (ghc_e s)) $ liftIO turnOffBuffering
-- Have to turn off buffering again, because we just
-- reverted stdout, stderr & stdin to their defaults.
-- Have to turn off buffering again, because we just
-- reverted stdout, stderr & stdin to their defaults.
@@
-350,8
+347,8
@@
initInterpBuffering = do -- make sure these are linked
flushInterpBuffers :: GHCi ()
flushInterpBuffers
flushInterpBuffers :: GHCi ()
flushInterpBuffers
- = io $ do getHandle stdout_ptr >>= hFlush
- getHandle stderr_ptr >>= hFlush
+ = liftIO $ do getHandle stdout_ptr >>= hFlush
+ getHandle stderr_ptr >>= hFlush
turnOffBuffering :: IO ()
turnOffBuffering
turnOffBuffering :: IO ()
turnOffBuffering