process-listlike-0.10: Process extras

Safe HaskellNone

System.Process.ListLike.Classes

Synopsis

Documentation

class ListLikeIO a c => ListLikeLazyIO a c whereSource

Class of types which can be used as the input and outputs of these process functions.

Methods

readChunks :: Handle -> IO [a]Source

Read the list of chunks from this handle. For lazy types this is just a call to hGetContents followed by toChunks. For strict types it might return a singleton list. Strings are trickier.

Instances

ListLikeLazyIO String Char

This String instance is implemented using the Lazy Text instance. Otherwise (without some serious coding) String would be a strict instance . Note that the readProcess in the process library is strict, while our equivalent is not - see test4 in Tests/Dots.hs.

ListLikeLazyIO String Char 
ListLikeLazyIO ByteString Word8 
ListLikeLazyIO ByteString Word8 
ListLikeLazyIO Text Char 
ListLikeLazyIO Text Char 

class Monoid b => ProcessOutput a b | b -> a whereSource

Methods for turning the output of a process into a monoid.

Methods

pidf :: ProcessHandle -> bSource

outf :: a -> bSource

errf :: a -> bSource

intf :: SomeException -> bSource

codef :: ExitCode -> bSource

Instances

(ListLikeLazyIO a c, Monoid a) => ProcessOutput a (StdoutWrapper a) 
ListLikeLazyIO a c => ProcessOutput a [Chunk a] 
ListLikeLazyIO a c => ProcessOutput a (ExitCode, [Chunk a]) 
ListLikeLazyIO a c => ProcessOutput a (ExitCode, a, a)