Hi, The API of Language.Haskell.Interpreter says, that 'runInterpreter'
runInterpreter :: (MonadCatchIO m, Functor m) => InterpreterT m a -> m (Either InterpreterError a) returns 'Left' in case of errors and 'GhcExceptions from the underlying GHC API are caught and rethrown as this'. What kind of errors do a generate here, why are they not caught by runInterpreter and how can I catch them? I assumed to get a 'Left InterpreterError' from the first and an error in MonadCatchIO in the second. > :m +Language.Haskell.Interpreter > let estr1 = "let lst [a] = a; lst _ = error \"foo\" in lst []" > let estr1 = "let lst [a] = a; in lst []" > runInterpreter (setImportsQ [("Prelude", Nothing)] >> eval estr1 ) Right "*** Exception: foo > runInterpreter ( eval estr2) Right "*** Exception: <interactive>:1:101-111: Non-exhaustive patterns in function lst Thanks a lot _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe