Safe Haskell | Safe-Inferred |
---|
Provides a typeclass for all monads that may scan text.
- class Monad m => MonadScanner m where
- newtype HereStringT m a = HereString {
- runHereStringT :: String -> m (a, String)
- newtype QuietT m a = Quiet {
- runQuietT :: m a
- newtype InRedirT m a = InRedir {
- runInRedirT' :: Handle -> m (a, Handle)
- type InRedir = InRedirT (HandleCloserT IO)
- runInRedirT :: Functor m => InRedirT m a -> Handle -> m a
- runInRedir :: InRedir a -> Handle -> IO a
- runInRedirFT :: (Functor m, MonadIO m, MonadFinalizer m) => InRedirT m a -> FilePath -> m a
- runInRedirF :: InRedir a -> FilePath -> IO a
- mscanLn :: MonadScanner m => m String
- mscanN :: MonadScanner m => Int -> m String
- data EmptyI = EmptyI
- class RedirectionSource t mt a r | t -> mt, t a -> r where
- (.<.) :: (MonadFinalizer m, Functor m, MonadIO m, MonadScanner (mt m)) => mt m a -> t -> m a
- class RedirectionHeredoc t mt a r | t -> mt, t a -> r where
- (.<<.) :: (Functor m, MonadScanner (mt m)) => mt m a -> t -> m a
Documentation
class Monad m => MonadScanner m whereSource
A typeclass for all monads that may read input.
Read one single character
Lazily read all the input.
mscannable :: m BoolSource
Input readable? (not EOF)
mscanh :: m (Maybe Handle)Source
Return FD handle, if available
Input available yet?
newtype HereStringT m a Source
HereStringT holds a given string and uses it as input for the function (much like here-strings in the shell)
HereString | |
|
MonadTrans HereStringT | |
RedirectionHeredoc String HereStringT a a | |
ChannelPrinter Bool m0 => ChannelPrinter Bool (HereStringT m0) | |
ChannelPrinter Int m0 => ChannelPrinter Int (HereStringT m0) | |
ChannelPrinter Handle m0 => ChannelPrinter Handle (HereStringT m0) | |
Monad m => Monad (HereStringT m) | |
Monad m => Functor (HereStringT m) | |
MonadIO m => MonadIO (HereStringT m) | |
MonadRandom m0 => MonadRandom (HereStringT m0) | |
MonadClock m0 => MonadClock (HereStringT m0) | |
MonadFinalizer m => MonadFinalizer (HereStringT m) | |
Monad m => MonadScanner (HereStringT m) | |
MonadPrinter m0 => MonadPrinter (HereStringT m0) | |
MonadSpawn m0 => MonadSpawn (HereStringT m0) | |
ExtendedPrinter m0 => ExtendedPrinter (HereStringT m0) | |
MonadExpand m0 => MonadExpand (HereStringT m0) | |
ExpanderEnv m0 => ExpanderEnv (HereStringT m0) | |
HistoryEnv m0 => HistoryEnv (HereStringT m0) |
QuietT does not convey any input (much like <devnull in the shell)
MonadTrans QuietT | |
RedirectionSource EmptyI QuietT a a | |
ChannelPrinter Bool m0 => ChannelPrinter Bool (QuietT m0) | |
ChannelPrinter Int m0 => ChannelPrinter Int (QuietT m0) | |
ChannelPrinter Handle m0 => ChannelPrinter Handle (QuietT m0) | |
Monad m => Monad (QuietT m) | |
Functor m => Functor (QuietT m) | |
MonadRandom m0 => MonadRandom (QuietT m0) | |
MonadClock m0 => MonadClock (QuietT m0) | |
Monad m => MonadScanner (QuietT m) | |
MonadPrinter m0 => MonadPrinter (QuietT m0) | |
MonadSpawn m0 => MonadSpawn (QuietT m0) | |
ExtendedPrinter m0 => ExtendedPrinter (QuietT m0) | |
MonadExpand m0 => MonadExpand (QuietT m0) | |
ExpanderEnv m0 => ExpanderEnv (QuietT m0) | |
HistoryEnv m0 => HistoryEnv (QuietT m0) |
InRedirT redirects all input to a given handle (much like <filename in the shell)
InRedir | |
|
MonadTrans InRedirT | |
RedirectionSource FilePath InRedirT a a | |
ChannelPrinter Bool m0 => ChannelPrinter Bool (InRedirT m0) | |
ChannelPrinter Int m0 => ChannelPrinter Int (InRedirT m0) | |
ChannelPrinter Handle m0 => ChannelPrinter Handle (InRedirT m0) | |
Monad m => Monad (InRedirT m) | |
Monad m => Functor (InRedirT m) | |
MonadIO m => MonadIO (InRedirT m) | |
MonadRandom m0 => MonadRandom (InRedirT m0) | |
MonadClock m0 => MonadClock (InRedirT m0) | |
MonadFinalizer m => MonadFinalizer (InRedirT m) | |
MonadIO m => MonadScanner (InRedirT m) | |
MonadPrinter m0 => MonadPrinter (InRedirT m0) | |
MonadSpawn m0 => MonadSpawn (InRedirT m0) | |
ExtendedPrinter m0 => ExtendedPrinter (InRedirT m0) | |
MonadExpand m0 => MonadExpand (InRedirT m0) | |
ExpanderEnv m0 => ExpanderEnv (InRedirT m0) | |
HistoryEnv m0 => HistoryEnv (InRedirT m0) |
type InRedir = InRedirT (HandleCloserT IO)Source
InRedirT on an IO monad
runInRedirT :: Functor m => InRedirT m a -> Handle -> m aSource
Run InRedirT with handle
runInRedir :: InRedir a -> Handle -> IO aSource
Run InRedir with handle
runInRedirFT :: (Functor m, MonadIO m, MonadFinalizer m) => InRedirT m a -> FilePath -> m aSource
Run InRedirT with a filename
runInRedirF :: InRedir a -> FilePath -> IO aSource
Run InRedir with a filename
mscanLn :: MonadScanner m => m StringSource
Line-scanning alternative to mscan1/L
mscanN :: MonadScanner m => Int -> m StringSource
Scan a fixed number of chars
Redirection source that does not provide any output
class RedirectionSource t mt a r | t -> mt, t a -> r whereSource
Class for all primitive redirection sources.
(.<.) :: (MonadFinalizer m, Functor m, MonadIO m, MonadScanner (mt m)) => mt m a -> t -> m aSource
Redirection
class RedirectionHeredoc t mt a r | t -> mt, t a -> r whereSource
Class for all Here-Documents
(.<<.) :: (Functor m, MonadScanner (mt m)) => mt m a -> t -> m aSource
Redirection