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
- guardInput :: (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
- timedInput :: 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 getInputLine, 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
guardInput :: (MonadIO m, MonadMask m) => (a -> Bool) -> InputT m a -> InputT m a Source #
guard prompt with 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
timedInput :: MonadIO m => InputT m a -> InputT m a Source #
repeat prompt if input returned within milliseconds
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 | |
MonadIO m => MonadIO (MaybeT m) | |
Defined in Control.Monad.Trans.Maybe liftIO :: IO a -> MaybeT m a | |
(Error e, MonadIO m) => MonadIO (ErrorT e m) | |
Defined in Control.Monad.Trans.Error liftIO :: IO a -> ErrorT e m a | |
MonadIO m => MonadIO (ExceptT e m) | |
Defined in Control.Monad.Trans.Except liftIO :: IO a -> ExceptT e m a | |
MonadIO m => MonadIO (IdentityT m) | |
Defined in Control.Monad.Trans.Identity liftIO :: IO a -> IdentityT m a | |
MonadIO m => MonadIO (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader liftIO :: IO a -> ReaderT r m a | |
MonadIO m => MonadIO (StateT s m) | |
Defined in Control.Monad.Trans.State.Lazy liftIO :: IO a -> StateT s m a | |
MonadIO m => MonadIO (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict liftIO :: IO a -> StateT s m a | |
(Monoid w, MonadIO m) => MonadIO (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Lazy liftIO :: IO a -> WriterT w m a | |
(Monoid w, MonadIO m) => MonadIO (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Strict liftIO :: IO a -> WriterT w m a | |
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Lazy liftIO :: IO a -> RWST r w s m a | |
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Strict liftIO :: IO a -> RWST r w s 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) |