highlight-1.0.0.2: Command line tool for highlighting parts of files matching a regex.
Safe HaskellNone
LanguageHaskell2010

Highlight.Common.Monad.Output

Synopsis

Documentation

data Output Source #

Sum-type to represent where a given ByteString should be output, whether it is stdout or stderr.

Instances

Instances details
Eq Output Source # 
Instance details

Defined in Highlight.Common.Monad.Output

Methods

(==) :: Output -> Output -> Bool #

(/=) :: Output -> Output -> Bool #

Read Output Source # 
Instance details

Defined in Highlight.Common.Monad.Output

Show Output Source # 
Instance details

Defined in Highlight.Common.Monad.Output

handleInputData Source #

Arguments

:: forall m. MonadIO m 
=> (ByteString -> m [ByteString])

Function to use for conversion for a line from stdin.

-> (FilenameHandlingFromFiles -> ByteString -> Int -> ByteString -> m [ByteString])

Function to use for conversion for a line from a normal file.

-> (ByteString -> IOException -> Maybe IOException -> m [ByteString])

Function to use for conversion for an io error.

-> InputData m ()

All of the input lines.

-> Producer Output m () 

Convert InputData to Output.

runOutputProducer :: forall m. MonadIO m => Producer Output m () -> m () Source #

Run a Producer Output by connecting it to outputConsumer.