repl-0.92: IRC friendly REPL library.

Safe HaskellNone

Language.Haskell.Repl

Contents

Synopsis

Documentation

Construction

repl'Source

Arguments

:: [String]

Imports, using normal Haskell import syntax

-> [ExtensionFlag]

List of compiler extensions to use

-> Chan Input

Input channel

-> Chan ReplOutput

Output channel

-> Maybe Double

Maximum time to wait for a result, in seconds (default: 5)

-> Maybe Int

Maximum line length in Char (default: 512)

-> IO Repl 

Repl smart constructor.

Stopping

Interaction

prompt :: Repl -> String -> IO [String]Source

Same as prompt_, except it parses the input, and pretty prints the results.

prompt_ :: Repl -> Input -> IO OutputSource

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.

input :: Repl -> Input -> IO ()Source

Send input.

output :: Repl -> IO ReplOutputSource

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.