-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | IRC friendly REPL library.
--
-- IRC friendly REPL library. Similar to mueval, but implemented as a
-- server using the GHC API, making it much faster than mueval.
@package repl
@version 0.92
module Language.Haskell.Repl
data Repl
newRepl :: IO Repl
-- | Repl smart constructor.
repl' :: [String] -> [ExtensionFlag] -> Chan Input -> Chan ReplOutput -> Maybe Double -> Maybe Int -> IO Repl
defaultExtensions :: [ExtensionFlag]
defaultImports :: [String]
defaultLineLength :: Int
defaultPatienceForResults :: Double
stopRepl :: Repl -> IO ()
data Input
Type :: String -> Input
Kind :: String -> Input
Info :: String -> Input
Decl :: String -> Input
Stmt :: String -> Input
Expr :: String -> Input
Undefine :: String -> Input
Clear :: Input
data ReplOutput
ReplError :: String -> ReplOutput
GhcError :: String -> ReplOutput
Output :: [String] -> ReplOutput
data Output
OK :: [String] -> Output
Exception :: [String] -> String -> Output
Errors :: [String] -> Output
Partial :: [String] -> Output
Timeout :: Output
-- | Same as prompt_, except it parses the input, and pretty prints
-- the results.
prompt :: Repl -> String -> IO [String]
-- | Enter commands and an expression to a Repl, and immediately
-- consume results. However, truncate input to the given length, and stop
-- the computation after the given amount of time in seconds.
prompt_ :: Repl -> Input -> IO Output
-- | Send input.
input :: Repl -> Input -> IO ()
-- | Naiively get the next set of results. This does not take into
-- account patienceForResults, patienceForErrors, or
-- lineLength. However, due to laziness, this may not matter.
output :: Repl -> IO ReplOutput
-- | Used by prompt.
prettyOutput :: Output -> [String]
-- | Used by prompt
parseInput :: Parser Input
instance Show Input
instance Show ReplOutput
instance Show Output