@@ -27,7 +27,7 @@ import System.Console.Haskeline
2727import System.Exit (exitSuccess )
2828import qualified System.IO.Strict as Strict
2929import Telomare
30- import Telomare.Eval (EvalError ( .. ), compileUnitTestNoAbort )
30+ import Telomare.Eval (compileUnitTestNoAbort )
3131import Telomare.Parser (TelomareParser , parseAssignment , parseLongExpr ,
3232 parsePrelude )
3333import Telomare.Possible (deferB , evalPartial' )
@@ -110,14 +110,14 @@ printLastExpr eval bindings = do
110110 case lookup " _tmp_" bindings' of
111111 Nothing -> putStrLn " Could not find _tmp_ in bindings"
112112 Just upt -> do
113- let compile' :: Term3 -> Either String IExpr
113+ let compile' :: Term3 -> Either EvalError IExpr
114114 compile' x = case compileUnitTestNoAbort x of
115- Left err -> Left . show $ err
115+ Left err -> Left err
116116 Right r -> case toTelomare r of
117117 Just te -> pure $ fromTelomare te
118- _ -> Left $ " conversion error from compiled expr:\n " <> prettyPrint r
119- case compile' =<< process (DummyLoc :< LetUPF bindings' upt) of
120- Left err -> putStrLn err
118+ _ -> Left . RTE . ResultConversionError $ " conversion error from compiled expr:\n " <> prettyPrint r
119+ case compile' =<< first RE ( process (DummyLoc :< LetUPF bindings' upt) ) of
120+ Left err -> print err
121121 Right iexpr' -> case eval iexpr' of
122122 Left e -> putStrLn $ " error: " <> show e
123123 Right expr' -> print . PrettyIExpr $ expr'
0 commit comments