Safe Haskell | Safe-Inferred |
---|
Provides a typeclass for all monads that may scan text.
- class Monad m => ChScanner 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, ChFinalizer m) => InRedirT m a -> FilePath -> m a
- runInRedirF :: InRedir a -> FilePath -> IO a
- mscanLn :: ChScanner m => m String
- mscanN :: ChScanner m => Int -> m String
- data EmptyI = EmptyI
- class RedirectionSource t mt a r | t -> mt, t a -> r where
- (.<.) :: (ChFinalizer m, Functor m, MonadIO m, ChScanner (mt m)) => mt m a -> t -> m r
- class RedirectionHeredoc t mt a r | t -> mt, t a -> r where
Documentation
class Monad m => ChScanner 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?
ChScanner IO | |
ChScanner m0 => ChScanner (HandleCloserT m0) | |
MonadIO m => ChScanner (InRedirT m) | |
Monad m => ChScanner (QuietT m) | |
Monad m => ChScanner (HereStringT m) | |
ChScanner m => ChScanner (ScannerBufferT m) | |
ChScanner m0 => ChScanner (RecorderT m0) | |
ChScanner m0 => ChScanner (OutRedirT m0) | |
ChScanner m0 => ChScanner (DeafT m0) | |
ChScanner m0 => ChScanner (SpawnOverlayT m0) | |
ChScanner m0 => ChScanner (JoinerT m0) | |
ChScanner m0 => ChScanner (HandleFilterT m0) | |
ChScanner m0 => ChScanner (BoolFilterT m0) | |
ChScanner m0 => ChScanner (IntFilterT m0) | |
ChScanner m0 => ChScanner (HandleArchiverT m0) | |
ChScanner m0 => ChScanner (BoolArchiverT m0) | |
ChScanner m0 => ChScanner (IntArchiverT m0) | |
ChAtoms m => ChScanner (FileScannerT m) | |
ChScanner m0 => ChScanner (NullExpanderT m0) | |
ChScanner m0 => ChScanner (ExpanderT m0) | |
ChScanner m0 => ChScanner (HistoryT m0) | |
ChScanner m0 => ChScanner (HtmlPrinterT m0) | |
ChScanner m0 => ChScanner (AnsiPrinterT m0) | |
Monad m => ChScanner (StateT String m) |
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 | |
ChChannelPrinter Bool m0 => ChChannelPrinter Bool (HereStringT m0) | |
ChChannelPrinter Int m0 => ChChannelPrinter Int (HereStringT m0) | |
ChChannelPrinter Handle m0 => ChChannelPrinter Handle (HereStringT m0) | |
Monad m => Monad (HereStringT m) | |
Monad m => Functor (HereStringT m) | |
MonadIO m => MonadIO (HereStringT m) | |
ChRandom m0 => ChRandom (HereStringT m0) | |
ChClock m0 => ChClock (HereStringT m0) | |
ChFinalizer m => ChFinalizer (HereStringT m) | |
Monad m => ChScanner (HereStringT m) | |
Monad m => ChBufferedScanner (HereStringT m) | |
ChPrinter m0 => ChPrinter (HereStringT m0) | |
ChSpawn m0 => ChSpawn (HereStringT m0) | |
ChExtendedPrinter m0 => ChExtendedPrinter (HereStringT m0) | |
ChExpand m0 => ChExpand (HereStringT m0) | |
ChExpanderEnv m0 => ChExpanderEnv (HereStringT m0) | |
ChHistoryEnv m0 => ChHistoryEnv (HereStringT m0) |
QuietT does not convey any input (much like <devnull in the shell)
MonadTrans QuietT | |
RedirectionSource EmptyI QuietT a a | |
ChChannelPrinter Bool m0 => ChChannelPrinter Bool (QuietT m0) | |
ChChannelPrinter Int m0 => ChChannelPrinter Int (QuietT m0) | |
ChChannelPrinter Handle m0 => ChChannelPrinter Handle (QuietT m0) | |
Monad m => Monad (QuietT m) | |
Functor m => Functor (QuietT m) | |
ChRandom m0 => ChRandom (QuietT m0) | |
ChClock m0 => ChClock (QuietT m0) | |
Monad m => ChScanner (QuietT m) | |
ChPrinter m0 => ChPrinter (QuietT m0) | |
ChSpawn m0 => ChSpawn (QuietT m0) | |
ChExtendedPrinter m0 => ChExtendedPrinter (QuietT m0) | |
ChExpand m0 => ChExpand (QuietT m0) | |
ChExpanderEnv m0 => ChExpanderEnv (QuietT m0) | |
ChHistoryEnv m0 => ChHistoryEnv (QuietT m0) |
InRedirT redirects all input to a given handle (much like <filename in the shell)
InRedir | |
|
MonadTrans InRedirT | |
RedirectionSource Handle InRedirT a a | |
RedirectionSource FilePath InRedirT a a | |
ChChannelPrinter Bool m0 => ChChannelPrinter Bool (InRedirT m0) | |
ChChannelPrinter Int m0 => ChChannelPrinter Int (InRedirT m0) | |
ChChannelPrinter Handle m0 => ChChannelPrinter Handle (InRedirT m0) | |
Monad m => Monad (InRedirT m) | |
Monad m => Functor (InRedirT m) | |
MonadIO m => MonadIO (InRedirT m) | |
ChRandom m0 => ChRandom (InRedirT m0) | |
ChClock m0 => ChClock (InRedirT m0) | |
ChFinalizer m => ChFinalizer (InRedirT m) | |
MonadIO m => ChScanner (InRedirT m) | |
ChPrinter m0 => ChPrinter (InRedirT m0) | |
ChSpawn m0 => ChSpawn (InRedirT m0) | |
ChExtendedPrinter m0 => ChExtendedPrinter (InRedirT m0) | |
ChExpand m0 => ChExpand (InRedirT m0) | |
ChExpanderEnv m0 => ChExpanderEnv (InRedirT m0) | |
ChHistoryEnv m0 => ChHistoryEnv (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, ChFinalizer m) => InRedirT m a -> FilePath -> m aSource
Run InRedirT with a filename
runInRedirF :: InRedir a -> FilePath -> IO aSource
Run InRedir with a filename
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.
class RedirectionHeredoc t mt a r | t -> mt, t a -> r whereSource
Class for all Here-Documents