-- 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.95
module Language.Haskell.Repl
data Repl a
-- | Default GHCi-like Repl
newRepl :: IO (Repl [String])
-- | Repl smart constructor.
repl' :: Chan Input -> Chan (ReplOutput a) -> [String] -> [ExtensionFlag] -> (String -> String) -> (Dynamic -> IO a) -> Double -> Int -> IO (Repl a)
defaultExtensions :: [ExtensionFlag]
defaultImports :: [String]
-- | defaultLineLength = 512
defaultLineLength :: Int
-- | defaultPatience = 5
defaultPatience :: Double
stopRepl :: Repl a -> 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 a
ReplError :: String -> ReplOutput a
GhcError :: String -> ReplOutput a
Output :: [String] -> ReplOutput a
Result :: a -> ReplOutput a
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] -> 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 [String] -> Input -> IO Output
-- | Send input.
input :: Repl a -> Input -> IO ()
-- | Naiively get the next set of results. This does not take into
-- account patiences, patienceForErrors, or
-- lineLength. However, due to laziness, this may not matter.
output :: Repl a -> IO (ReplOutput a)
-- | Used by prompt.
prettyOutput :: Output -> [String]
-- | Used by prompt
parseInput :: Parser Input
instance Show Input
instance Show a => Show (ReplOutput a)
instance Show Output