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

Safe Haskell | Trustworthy
Language | Haskell98

System.Console.Wizard.Haskeline

Contents

- Orphan instances

Synopsis

- data UnexpectedEOF = UnexpectedEOF
- data Haskeline a
- haskeline :: Wizard Haskeline a -> Wizard Haskeline a
- withSettings :: forall (b :: Type -> Type) a. 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

Instances details

Exception UnexpectedEOF Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods toException :: UnexpectedEOF -> SomeException Source # fromException :: SomeException -> Maybe UnexpectedEOF Source # displayException :: UnexpectedEOF -> String Source # backtraceDesired :: UnexpectedEOF -> Bool Source #
Show UnexpectedEOF Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods showsPrec :: Int -> UnexpectedEOF -> ShowS Source # show :: UnexpectedEOF -> String Source # showList :: [UnexpectedEOF] -> ShowS Source #

data Haskeline a Source #

Haskeline supports all the following features completely.

#### Instances

Instances details

Functor Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods fmap :: (a -> b) -> Haskeline a -> Haskeline b Source # (<$) :: a -> Haskeline b -> Haskeline a Source #
WithSettings :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: WithSettings a -> Haskeline a
ArbitraryIO :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: ArbitraryIO a -> Haskeline a
Character :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: Character a -> Haskeline a
Line :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: Line a -> Haskeline a
LinePrewritten :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: LinePrewritten a -> Haskeline a
Output :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: Output a -> Haskeline a
OutputLn :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: OutputLn a -> Haskeline a
Password :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: Password a -> Haskeline a
Run (InputT IO) Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods runAlgebra :: Haskeline (InputT IO v) -> InputT IO v 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 :: forall (b :: Type -> Type) a. 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

Instances details

Functor WithSettings Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods fmap :: (a -> b) -> WithSettings a -> WithSettings b Source # (<$) :: a -> WithSettings b -> WithSettings a Source #
WithSettings :<: Haskeline Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods inj :: WithSettings a -> Haskeline a
Run (InputT IO) WithSettings Source # |
Instance details Defined in System.Console.Wizard.Haskeline Methods runAlgebra :: WithSettings (InputT IO v) -> InputT IO v Source #

# Orphan instances

Run (InputT IO) ArbitraryIO Source # |
Instance details Methods runAlgebra :: ArbitraryIO (InputT IO v) -> InputT IO v Source #
Run (InputT IO) Character Source # |
Instance details Methods runAlgebra :: Character (InputT IO v) -> InputT IO v Source #
Run (InputT IO) Line Source # |
Instance details Methods runAlgebra :: Line (InputT IO v) -> InputT IO v Source #
Run (InputT IO) LinePrewritten Source # |
Instance details Methods runAlgebra :: LinePrewritten (InputT IO v) -> InputT IO v Source #
Run (InputT IO) Output Source # |
Instance details Methods runAlgebra :: Output (InputT IO v) -> InputT IO v Source #
Run (InputT IO) OutputLn Source # |
Instance details Methods runAlgebra :: OutputLn (InputT IO v) -> InputT IO v Source #
Run (InputT IO) Password Source # |
Instance details Methods runAlgebra :: Password (InputT IO v) -> InputT IO v Source #