¤ cmdContSP, cmdContK, et al

Types

cmdContSP :: a -> (b -> Maybe c) -> Cont (SP b a) c
cmdContK :: XCommand -> (XEvent -> Maybe a) -> Cont (K b c) a
cmdContF :: XCommand -> (XEvent -> Maybe a) -> Cont (F b c) a
cmdContLow :: (FudgetIO d) => XCommand -> (XEvent -> Maybe a) -> (a -> d b c) -> d b c
waitForSP :: (a -> Maybe b) -> (b -> SP a c) -> SP a c
dropSP :: (a -> Maybe b) -> (b -> SP a c) -> SP a c

Synopsis

cmdContSP request expected contf

Description

The cmdCont functions are used when you want to output a message and wait for a particular response. Except dropSP, other input is queued up until the expected input is received.

waitForSP can be used when you just want to wait for a particular message, without outputting something first.

dropSP is like \{waitForSP}, except that it will not queue other input.

Arguments

request :: a
The request to output
expected :: b -> Maybe c
A function to test input messages with. It should return Just x for the response you are waiting for and Nothing otherwise.
contf :: ??
The stream processor to continue with, parameterized by the response picked out by expected.

See Also

xrequestK, haskellIO.