wizards-1.0.2: High level, generic library for interrogative user interfaces

Safe Haskell | Trustworthy
Language | Haskell98

System.Console.Wizard.Pure

Synopsis

- data Pure a
- data UnexpectedEOI = UnexpectedEOI
- runPure :: Wizard Pure a -> String -> (Maybe a, String)
- type PureState = ([String], Seq Char)

# Documentation

data Pure a Source

The `Pure` backend supports only simple input and output. Support for `Password` and `LinePrewritten` features can be added with a shim from System.Console.Wizard.Shim.

Instances

Functor Pure Source |
Character :<: Pure Source |
Line :<: Pure Source |
OutputLn :<: Pure Source |
Output :<: Pure Source |
Run (State PureState) Pure Source |

data UnexpectedEOI Source

Thrown if the wizard ever unexpectedly runs out of input.

Constructors

UnexpectedEOI |

Instances

Show UnexpectedEOI Source |
Exception UnexpectedEOI Source |

runPure :: Wizard Pure a -> String -> (Maybe a, String) Source

Run a wizard in the Pure backend

type PureState = ([String], Seq Char) Source

The pure backend is actually just a simple state monad, with the following state.