diff options
-rw-r--r-- | src/Main.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Main.hs b/src/Main.hs index 7d263e3..3c62184 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -17,7 +17,7 @@ import System.IO import GHC.Stats (getRTSStats) -import Control.Monad.Error +import Control.Monad.Except import Control.Monad.Reader import Control.Monad.State import Control.Monad.Writer @@ -196,9 +196,6 @@ data ExecError = UnhandledInputError String | OtherError String -instance Error ExecError where - noMsg = OtherError "something went wrong" - prettyError :: ExecError -> String @@ -213,7 +210,7 @@ prettyError (OtherError s) = newtype VT a = VT (ReaderT VTConfig - (ErrorT ExecError + (ExceptT ExecError (WriterT [String] (StateT VTState IO ))) @@ -233,7 +230,7 @@ runVT :: VTConfig -> VTState -> VT a -> IO ((Either ExecError a, [String]), VTState) runVT cf st (VT a) = - runStateT (runWriterT (runErrorT (runReaderT a cf))) st + runStateT (runWriterT (runExceptT (runReaderT a cf))) st |