Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- data InputInterface
- data InputState command = InputState {
- inputParseCommand :: String -> Maybe (command, String)
- inputMode :: Input
- inputCommand :: Maybe (Maybe command, Int)
- inputLineNumber :: Int
- inputAcc :: String
- data Input
- readInput :: String -> (Input, String)
- inputLine :: InputInterface -> InputState c -> String -> IO (InputState c, Maybe (Source, Maybe c, String))
Documentation
data InputInterface Source #
What interface is being used.
InputInterfaceArgs | Read commands from unix command-line args. |
InputInterfaceConsole | Read commands interactively from the console. |
InputInterfaceBatch FilePath | Read commands from the file with this name. |
data InputState command Source #
InputState | |
|
How we're reading the current expression.
InputLine | Read input line-by-line, using a backslash at the end of the line to continue to the next. |
InputBlock | Read input as a block terminated by a double semicolon (;;) |
InputFile FilePath | Read input from a file specified on the prompt |
inputLine :: InputInterface -> InputState c -> String -> IO (InputState c, Maybe (Source, Maybe c, String)) Source #