-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Disciplined Disciple Compiler user interface support. -- -- Disciplined Disciple Compiler user interface support. @package ddc-interface @version 0.3.2.1 module DDC.Interface.Source -- | Where some source code was obtained from. -- -- This is used when generating error messages. data Source -- | Read directly from a file. SourceFile :: FilePath -> Source -- | Supplied on the command line. SourceArgs :: Source -- | Typed into the console. SourceConsole :: Int -> Source -- | Part of a .dcx batch file. SourceBatch :: FilePath -> Int -> Source -- | Get the starting source line number to report for this source. lineStartOfSource :: Source -> Int -- | Get the name of a source. nameOfSource :: Source -> String instance Eq Source instance Show Source module DDC.Interface.Input -- | What interface is being used. data InputInterface -- | Read commands from unix command-line args. InputInterfaceArgs :: InputInterface -- | Read commands interactively from the console. InputInterfaceConsole :: InputInterface -- | Read commands from the file with this name. InputInterfaceBatch :: FilePath -> InputInterface data InputState command InputState :: (String -> Maybe (command, String)) -> Input -> Maybe (Maybe command, Int) -> Int -> String -> InputState command inputParseCommand :: InputState command -> String -> Maybe (command, String) inputMode :: InputState command -> Input inputCommand :: InputState command -> Maybe (Maybe command, Int) inputLineNumber :: InputState command -> Int inputAcc :: InputState command -> String -- | How we're reading the current expression. data Input -- | Read input line-by-line, using a backslash at the end of the line to -- continue to the next. InputLine :: Input -- | Read input as a block terminated by a double semicolon (;;) InputBlock :: Input -- | Read input from a file specified on the prompt InputFile :: FilePath -> Input -- | Read the input mode from the front of a string. readInput :: String -> (Input, String) inputLine :: InputInterface -> InputState c -> String -> IO (InputState c, Maybe (Source, Maybe c, String)) instance Eq InputInterface instance Show InputInterface instance Eq Input instance Show Input