Copyright | Copyright (c) 2020-2022 Travis Cardwell |
---|---|
License | MIT |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- class Monad m => MonadHandle m where
- handleToTerminal :: forall m s. (MonadHandle m, MonadTerminal m) => (s -> Text -> Either String (Line, s)) -> (s -> Maybe String) -> s -> [SGR] -> Handle -> m (Either Error ())
- handleToTerminal' :: forall m s. (MonadHandle m, MonadTerminal m) => (s -> Text -> (Line, s)) -> s -> [SGR] -> Handle -> m ()
- fileToTerminal :: (MonadHandle m, MonadTerminal m) => (s -> Text -> Either String (Line, s)) -> (s -> Maybe String) -> s -> [SGR] -> FilePath -> m (Either Error ())
- fileToTerminal' :: (MonadHandle m, MonadTerminal m) => (s -> Text -> (Line, s)) -> s -> [SGR] -> FilePath -> m (Either Error ())
MonadHandle
class Monad m => MonadHandle m where Source #
Handle I/O
Since: 0.4.0.0
Internal
:: forall m s. (MonadHandle m, MonadTerminal m) | |
=> (s -> Text -> Either String (Line, s)) | step function |
-> (s -> Maybe String) | end function |
-> s | initial state |
-> [SGR] |
|
-> Handle | |
-> m (Either Error ()) |
Redact text from a Handle
strictly, putting it to the terminal
:: forall m s. (MonadHandle m, MonadTerminal m) | |
=> (s -> Text -> (Line, s)) | step function |
-> s | initial state |
-> [SGR] |
|
-> Handle | |
-> m () |
Redact text from a Handle
leniently, putting it to the terminal
:: (MonadHandle m, MonadTerminal m) | |
=> (s -> Text -> Either String (Line, s)) | step function |
-> (s -> Maybe String) | end function |
-> s | initial state |
-> [SGR] |
|
-> FilePath | |
-> m (Either Error ()) |
Redact text from a file strictly, putting it to the terminal
:: (MonadHandle m, MonadTerminal m) | |
=> (s -> Text -> (Line, s)) | step function |
-> s | initial state |
-> [SGR] |
|
-> FilePath | |
-> m (Either Error ()) |
Redact text from a file leniently, putting it to the terminal