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

Safe Haskell | Trustworthy
Language | Haskell98

System.Console.Wizard.Pure

Contents

- Orphan instances

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

Instances details

Functor Pure Source # |
Instance details Defined in System.Console.Wizard.Pure Methods fmap :: (a -> b) -> Pure a -> Pure b Source # (<$) :: a -> Pure b -> Pure a Source #
Character :<: Pure Source # |
Instance details Defined in System.Console.Wizard.Pure Methods inj :: Character a -> Pure a
Line :<: Pure Source # |
Instance details Defined in System.Console.Wizard.Pure Methods inj :: Line a -> Pure a
Output :<: Pure Source # |
Instance details Defined in System.Console.Wizard.Pure Methods inj :: Output a -> Pure a
OutputLn :<: Pure Source # |
Instance details Defined in System.Console.Wizard.Pure Methods inj :: OutputLn a -> Pure a
Run (State PureState) Pure Source # |
Instance details Defined in System.Console.Wizard.Pure Methods runAlgebra :: Pure (State PureState v) -> State PureState v Source #

data UnexpectedEOI Source #

Thrown if the wizard ever unexpectedly runs out of input.

Constructors

UnexpectedEOI |

#### Instances

Instances details

Exception UnexpectedEOI Source # |
Instance details Defined in System.Console.Wizard.Pure Methods toException :: UnexpectedEOI -> SomeException Source # fromException :: SomeException -> Maybe UnexpectedEOI Source # displayException :: UnexpectedEOI -> String Source # backtraceDesired :: UnexpectedEOI -> Bool Source #
Show UnexpectedEOI Source # |
Instance details Defined in System.Console.Wizard.Pure Methods showsPrec :: Int -> UnexpectedEOI -> ShowS Source # show :: UnexpectedEOI -> String Source # showList :: [UnexpectedEOI] -> ShowS 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.

# Orphan instances

Run (State PureState) Character Source # |
Instance details Methods runAlgebra :: Character (State PureState v) -> State PureState v Source #
Run (State PureState) Line Source # |
Instance details Methods runAlgebra :: Line (State PureState v) -> State PureState v Source #
Run (State PureState) Output Source # |
Instance details Methods runAlgebra :: Output (State PureState v) -> State PureState v Source #
Run (State PureState) OutputLn Source # |
Instance details Methods runAlgebra :: OutputLn (State PureState v) -> State PureState v Source #