Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- getPromptLine :: (MonadIO m, MonadMask m) => String -> InputT m String
- getPromptInitial :: (MonadIO m, MonadMask m) => String -> String -> InputT m String
- getPromptChar :: (MonadIO m, MonadMask m) => String -> InputT m Char
- getPromptPassword :: (MonadIO m, MonadMask m) => String -> InputT m String
- getGenericPrompt :: MonadIO m => (String -> InputT m (Maybe a)) -> String -> InputT m a
- runPrompt :: (MonadIO m, MonadMask m) => InputT m a -> m a
- untilInput :: (MonadIO m, MonadMask m) => (a -> Bool) -> InputT m a -> InputT m a
- mapInput :: (MonadIO m, MonadMask m) => (a -> Maybe b) -> InputT m a -> InputT m b
- nonEmptyInput :: (MonadIO m, MonadMask m) => InputT m String -> InputT m String
- clearedInput :: MonadIO m => InputT m a -> InputT m a
- class Monad m => MonadIO (m :: Type -> Type)
- class MonadCatch m => MonadMask (m :: Type -> Type)
Documentation
getPromptLine :: (MonadIO m, MonadMask m) => String -> InputT m String Source #
like getInputLine
, but error if fails
getPromptInitial :: (MonadIO m, MonadMask m) => String -> String -> InputT m String Source #
like getPromptLine
, but with initial input
getPromptChar :: (MonadIO m, MonadMask m) => String -> InputT m Char Source #
like getInputChar
, but error if fails
getPromptPassword :: (MonadIO m, MonadMask m) => String -> InputT m String Source #
get password
getGenericPrompt :: MonadIO m => (String -> InputT m (Maybe a)) -> String -> InputT m a Source #
generic prompt wrapper
untilInput :: (MonadIO m, MonadMask m) => (a -> Bool) -> InputT m a -> InputT m a Source #
loop prompt until check
mapInput :: (MonadIO m, MonadMask m) => (a -> Maybe b) -> InputT m a -> InputT m b Source #
maybe map input or loop prompt
nonEmptyInput :: (MonadIO m, MonadMask m) => InputT m String -> InputT m String Source #
repeat prompt until non-empty
clearedInput :: MonadIO m => InputT m a -> InputT m a Source #
repeat prompt if input returned within milliseconds This prevents buffered stdin lines from being used.
class Monad m => MonadIO (m :: Type -> Type) #
liftIO
Instances
MonadIO IO | |
Defined in Control.Monad.IO.Class liftIO :: IO a -> IO a | |
MonadIO m => MonadIO (InputT m) | |
Defined in System.Console.Haskeline.InputT liftIO :: IO a -> InputT m a | |
(Error e, MonadIO m) => MonadIO (ErrorT e m) | |
Defined in Control.Monad.Trans.Error liftIO :: IO a -> ErrorT e m a |
class MonadCatch m => MonadMask (m :: Type -> Type) #
mask, uninterruptibleMask, generalBracket
Instances
MonadMask IO | |
Defined in Control.Monad.Catch mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b generalBracket :: IO a -> (a -> ExitCase b -> IO c) -> (a -> IO b) -> IO (b, c) | |
e ~ SomeException => MonadMask (Either e) | |
Defined in Control.Monad.Catch mask :: ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b uninterruptibleMask :: ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b generalBracket :: Either e a -> (a -> ExitCase b -> Either e c) -> (a -> Either e b) -> Either e (b, c) | |
MonadMask m => MonadMask (InputT m) | |
Defined in System.Console.Haskeline.InputT mask :: ((forall a. InputT m a -> InputT m a) -> InputT m b) -> InputT m b uninterruptibleMask :: ((forall a. InputT m a -> InputT m a) -> InputT m b) -> InputT m b generalBracket :: InputT m a -> (a -> ExitCase b -> InputT m c) -> (a -> InputT m b) -> InputT m (b, c) | |
MonadMask m => MonadMask (MaybeT m) | |
Defined in Control.Monad.Catch mask :: ((forall a. MaybeT m a -> MaybeT m a) -> MaybeT m b) -> MaybeT m b uninterruptibleMask :: ((forall a. MaybeT m a -> MaybeT m a) -> MaybeT m b) -> MaybeT m b generalBracket :: MaybeT m a -> (a -> ExitCase b -> MaybeT m c) -> (a -> MaybeT m b) -> MaybeT m (b, c) | |
(Error e, MonadMask m) => MonadMask (ErrorT e m) | |
Defined in Control.Monad.Catch mask :: ((forall a. ErrorT e m a -> ErrorT e m a) -> ErrorT e m b) -> ErrorT e m b uninterruptibleMask :: ((forall a. ErrorT e m a -> ErrorT e m a) -> ErrorT e m b) -> ErrorT e m b generalBracket :: ErrorT e m a -> (a -> ExitCase b -> ErrorT e m c) -> (a -> ErrorT e m b) -> ErrorT e m (b, c) | |
MonadMask m => MonadMask (ExceptT e m) | |
Defined in Control.Monad.Catch mask :: ((forall a. ExceptT e m a -> ExceptT e m a) -> ExceptT e m b) -> ExceptT e m b uninterruptibleMask :: ((forall a. ExceptT e m a -> ExceptT e m a) -> ExceptT e m b) -> ExceptT e m b generalBracket :: ExceptT e m a -> (a -> ExitCase b -> ExceptT e m c) -> (a -> ExceptT e m b) -> ExceptT e m (b, c) | |
MonadMask m => MonadMask (IdentityT m) | |
Defined in Control.Monad.Catch mask :: ((forall a. IdentityT m a -> IdentityT m a) -> IdentityT m b) -> IdentityT m b uninterruptibleMask :: ((forall a. IdentityT m a -> IdentityT m a) -> IdentityT m b) -> IdentityT m b generalBracket :: IdentityT m a -> (a -> ExitCase b -> IdentityT m c) -> (a -> IdentityT m b) -> IdentityT m (b, c) | |
MonadMask m => MonadMask (ReaderT r m) | |
Defined in Control.Monad.Catch mask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b uninterruptibleMask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b generalBracket :: ReaderT r m a -> (a -> ExitCase b -> ReaderT r m c) -> (a -> ReaderT r m b) -> ReaderT r m (b, c) | |
MonadMask m => MonadMask (StateT s m) | |
Defined in Control.Monad.Catch mask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b uninterruptibleMask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b generalBracket :: StateT s m a -> (a -> ExitCase b -> StateT s m c) -> (a -> StateT s m b) -> StateT s m (b, c) | |
MonadMask m => MonadMask (StateT s m) | |
Defined in Control.Monad.Catch mask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b uninterruptibleMask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b generalBracket :: StateT s m a -> (a -> ExitCase b -> StateT s m c) -> (a -> StateT s m b) -> StateT s m (b, c) | |
(MonadMask m, Monoid w) => MonadMask (WriterT w m) | |
Defined in Control.Monad.Catch mask :: ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b uninterruptibleMask :: ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b generalBracket :: WriterT w m a -> (a -> ExitCase b -> WriterT w m c) -> (a -> WriterT w m b) -> WriterT w m (b, c) | |
(MonadMask m, Monoid w) => MonadMask (WriterT w m) | |
Defined in Control.Monad.Catch mask :: ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b uninterruptibleMask :: ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b generalBracket :: WriterT w m a -> (a -> ExitCase b -> WriterT w m c) -> (a -> WriterT w m b) -> WriterT w m (b, c) | |
(MonadMask m, Monoid w) => MonadMask (RWST r w s m) | |
Defined in Control.Monad.Catch mask :: ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b uninterruptibleMask :: ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b generalBracket :: RWST r w s m a -> (a -> ExitCase b -> RWST r w s m c) -> (a -> RWST r w s m b) -> RWST r w s m (b, c) | |
(MonadMask m, Monoid w) => MonadMask (RWST r w s m) | |
Defined in Control.Monad.Catch mask :: ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b uninterruptibleMask :: ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b generalBracket :: RWST r w s m a -> (a -> ExitCase b -> RWST r w s m c) -> (a -> RWST r w s m b) -> RWST r w s m (b, c) |