System.Console.Wizard.Haskeline

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 #

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

data Haskeline a #

Haskeline supports all the following features completely.

#### Instances

Instances details

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

haskeline :: Wizard Haskeline a -> Wizard Haskeline a #

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 #

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

data WithSettings w #

Constructors

WithSettings (Settings IO) w |

#### Instances

Instances details

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

# Orphan instances

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