| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
DDC.Driver.Interface.Input
- 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.
Constructors
| 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. |
Instances
data InputState command Source #
Constructors
| InputState | |
Fields
| |
How we're reading the current expression.
Constructors
| 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 #