[typoes paolo.veronelli@gmail.com**20080204123524] { hunk ./Editor.hs 47 - | EvalErr String -- ^ something bad happened in the evaluation process (not implemented) + | EvalErr Err -- ^ something bad happened in the evaluation process hunk ./Editor.hs 68 - errorSIO :: Err -> m (), -- ^ output an error string + errorSIO :: String -> m (), -- ^ output an error string hunk ./Editor.hs 189 - => Err -- ^ the error happened + => String -- ^ the error happened hunk ./Editor.hs 202 - case x of Left err -> asks errorSIO >>= lift . lift . ($ err) + case x of Left err -> asks errorSIO >>= lift . lift . ($ show err) hunk ./Eval.hs 43 - either (errorlog . FileReadErr) (putfile . listIn . lines) >> + either (throwError . FileReadErr) (putfile . listIn . lines) >> hunk ./Eval.hs 45 -eval (CC Write _) = getname (errorlog FileNameMissing >> return "") >>= write >> - unsetlastsaved +eval (CC Write _) = getname (throwError FileNameMissing) >>= write >> unsetlastsaved hunk ./Eval.hs 49 -eval (CC GetFilename _) = getname (errorlog FileNameMissing >> return "") >>= output -eval (CC c@(SetFilename s) _) = evalSensible c $ - setfilename (Just s) >> unsetlastsaved +eval (CC GetFilename _) = getname (throwError FileNameMissing ) >>= output +eval (CC c@(SetFilename s) _) = gets filename >>= flip (maybe id (const $ evalSensible c)) + (setfilename (Just s) >> unsetlastsaved) hunk ./Eval.hs 54 - either (errorlog . ExternalCommandErr) (putfile . listIn . lines) >> + either (throwError . ExternalCommandErr) (putfile . listIn . lines) >> hunk ./Eval.hs 59 -writefail = either (errorlog . FileWriteErr) return +writefail = either (throwError . FileWriteErr) return hunk ./Eval.hs 71 +getname :: Ctx m w => Editor m w String -> Editor m w String hunk ./Main.hs 31 -programSio = SIO readline putStrLn addHistory print (handleWith show . strictReadFile) (\x y -> handleWith show (writeFile x y)) externalCommand +programSio = SIO readline putStrLn addHistory putStrLn (handleWith show . strictReadFile) (\x y -> handleWith show (writeFile x y)) externalCommand hunk ./Operation.hs 26 - let onunpending = setpending (Just c) >> errorlog (PendingState c) + let onunpending = setpending (Just c) >> errorlog (show $ PendingState c) hunk ./Operation.hs 65 - reaction StopErr = output "End" >> return False - reaction (Ahi x) = output ("Unhandled exception: " ++ x) >> return False - reaction BackendErr = output "Buffer index error" >> return True - reaction (ParserErr s) = output ("Parser error: " ++ s) >> return True - reaction (EvalErr s) = output ("Evaluation error: " ++ s) >> return True + reaction StopErr = errorlog "End" >> return False + reaction (Ahi x) = errorlog ("Unhandled exception: " ++ x) >> return False + reaction BackendErr = errorlog "Buffer index error" >> return True + reaction (ParserErr s) = errorlog ("Parser error: " ++ s) >> return True + reaction err = errorlog ("Evaluation error: " ++ show err) >> return True hunk ./docs/Editor.html 191 -> String Err :: (Err -> m ()) :: (String -> m ()) m w => Err -> m w => String -> String Errsomething bad happened in the evaluation process (not implemented) +>something bad happened in the evaluation process hunk ./docs/Editor.html 1225 -> :: (Err -> m ()) :: (String -> m ())=> Err=> String