Hedi-0.1: Line oriented editor

Operation

Description

Functions for read-eval-do managing

Synopsis

Documentation

modified :: Ctx m w => Editor m w BoolSource

a real check for file modification

evalSensible :: Ctx m w => Command -> Editor m w () -> Editor m w ()Source

a wrapper for commands evaluation which can discard changes

checkPendings :: Ctx m w => Editor m w () -> Editor m w ()Source

a wrapper for commands evaluation which cannot discard changes

commandModeSource

Arguments

:: Ctx m w 
=> (String -> Either String CompleteCommand)

the parser for the command on the line

-> (CompleteCommand -> Editor m w ())

the evaluator for the parsed command

-> Editor m w ()

updated beast

a step in main mode for the editor

commandLoopSource

Arguments

:: Ctx m w 
=> (String -> Either String CompleteCommand)

the parser for the command on the line

-> (CompleteCommand -> Editor m w ())

the evaluator for the parsed command

-> Editor m w ()

updated beast

looping in main mode with error log on output

inputMode :: Ctx m w => Editor m w [String]Source

the secondary mode for the editor where lines are inserted as input. It returns the lines.Use CTRL-D to exit