libexpect-0.2.0: Library for interacting with console applications via pseudoterminals.

System.Expect.ExpectCombinators

Synopsis

Documentation

data ExpectM a Source

Constructors

ExpectM (Maybe ExpectProc -> IO (a, Maybe ExpectProc)) 

Instances

spawnSource

Arguments

:: String

Command to spawn

-> ExpectM () 

Spawns the child process specified, and is used for all following actions.

sendSource

Arguments

:: String

Line to send to the process

-> ExpectM () 

Send a line to the current process.

switchSource

Arguments

:: [ExpectOption a]

List of cases

-> a

Resulting value in case of no case matches

-> ExpectM a 

Take a list of cases and run the action of the case that matches, or return a fail value in the case of no matches.

waitSource

Arguments

:: ExpectType

How pattern is used.

-> String

Pattern

-> ExpectM () 

Wait for a pattern to match.

checkSource

Arguments

:: ExpectType

How to interpret the pattern

-> String

Pattern

-> ExpectM a

action to take in case that the case matches

-> ExpectOption a 

Construct an option for use with switch

mute :: ExpectM ()Source

Mute expect.

unmute :: ExpectM ()Source

Unmute expect.

runExpectSource

Arguments

:: ExpectM a

ExpectM action to be run

-> IO a 

Run an ExpectM action.

runExpectIOSource

Arguments

:: ExpectM (IO a)

ExpectM action to be run

-> IO a 

Run an ExpectM (IO a) action, and join the result, moving it from IO (IO a) to IO a.