highlight-1.0.0.1: 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.

handleInputData Source #

Arguments

:: 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.