add proper MonadIO instance for REPL

This commit is contained in:
Adam C. Foltzer 2015-06-30 11:36:11 -04:00
parent f22cbdc4eb
commit 2bb86303bb
2 changed files with 3 additions and 3 deletions

View File

@ -133,9 +133,6 @@ data Cryptolrc =
-- Utilities -------------------------------------------------------------------
instance MTL.MonadIO REPL where
liftIO = io
instance MonadException REPL where
controlIO branchIO = REPL $ \ ref -> do
runBody <- branchIO $ RunIO $ \ m -> do

View File

@ -82,6 +82,7 @@ import qualified Cryptol.Parser.AST as P
import Cryptol.Symbolic (proverNames, lookupProver)
import Control.Monad (ap,unless,when)
import Control.Monad.IO.Class
import Data.Char (isSpace)
import Data.IORef
(IORef,newIORef,readIORef,modifyIORef)
@ -172,6 +173,8 @@ instance Monad REPL where
x <- unREPL m ref
unREPL (f x) ref
instance MonadIO REPL where
liftIO = io
-- Exceptions ------------------------------------------------------------------