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

Safe Haskell | Trustworthy
Language | Haskell98

System.Console.Wizard.Haskeline

Synopsis

- data UnexpectedEOF = UnexpectedEOF
- data Haskeline a
- haskeline :: Wizard Haskeline a -> Wizard Haskeline a
- withSettings :: WithSettings :<: b => Settings IO -> Wizard b a -> Wizard b a
- data WithSettings w = WithSettings (Settings IO) w

# Documentation

data UnexpectedEOF Source

The Haskeline back-end will throw this exception if EOF is encountered when it is not expected. Specifically, when actions such as `getInputLine` return `Nothing`.

Constructors

UnexpectedEOF |

Instances

Show UnexpectedEOF Source |
Exception UnexpectedEOF Source |

data Haskeline a Source

Haskeline supports all the following features completely.

Instances

Functor Haskeline Source |
ArbitraryIO :<: Haskeline Source |
Password :<: Haskeline Source |
LinePrewritten :<: Haskeline Source |
Character :<: Haskeline Source |
Line :<: Haskeline Source |
OutputLn :<: Haskeline Source |
Output :<: Haskeline Source |
WithSettings :<: Haskeline Source |
Run (InputT IO) Haskeline Source |

haskeline :: Wizard Haskeline a -> Wizard Haskeline a Source

A simple identity function, used to restrict types if the type inferred by GHC is too general. You could achieve the same effect with a type signature, but this is slightly less typing.

withSettings :: WithSettings :<: b => Settings IO -> Wizard b a -> Wizard b a Source

Modifies a wizard so that it will run with different Haskeline `Settings` to the top level input monad.

data WithSettings w Source

Constructors

WithSettings (Settings IO) w |

Instances

Functor WithSettings Source |
WithSettings :<: Haskeline Source |
Run (InputT IO) WithSettings Source |