process-listlike-0.6: Enhanced version of process-extras

Safe HaskellSafe-Inferred

System.Process.Read.Chars

Description

Versions of the functions in module Read specialized for type ByteString.

Synopsis

Documentation

class (Integral (LengthType a), ListLikeIO a c) => ListLikePlus a c whereSource

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

Associated Types

type LengthType a Source

Methods

binary :: a -> [Handle] -> IO ()Source

This should call hSetBinaryMode on each handle if a is a ByteString type, so that it doesn't attempt to decode the text using the current locale.

lazy :: a -> BoolSource

length' :: a -> LengthType aSource

readCreateProcessWithExitCodeSource

Arguments

:: forall a c . ListLikePlus a c 
=> CreateProcess

process to run

-> a

standard input

-> IO (ExitCode, a, a)

exitcode, stdout, stderr, exception

A polymorphic implementation of readProcessWithExitCode with a few generalizations:

  1. The input and outputs can be any instance of ListLikePlus.
  2. Allows you to modify the CreateProcess record before the process starts
  3. Takes a CmdSpec, so you can launch either a RawCommand or a ShellCommand.

readCreateProcessSource

Arguments

:: ListLikePlus a c 
=> CreateProcess

process to run

-> a

standard input

-> IO a

stdout

A polymorphic implementation of readProcess with a few generalizations:

  1. The input and outputs can be any instance of ListLikePlus.
  2. Allows you to modify the CreateProcess record before the process starts
  3. Takes a CmdSpec, so you can launch either a RawCommand or a ShellCommand.

readProcessWithExitCodeSource

Arguments

:: ListLikePlus a c 
=> FilePath

command to run

-> [String]

any arguments

-> a

standard input

-> IO (ExitCode, a, a)

exitcode, stdout, stderr

A polymorphic implementation of readProcessWithExitCode in terms of readCreateProcessWithExitCode.

readProcessSource

Arguments

:: ListLikePlus a c 
=> FilePath

command to run

-> [String]

any arguments

-> a

standard input

-> IO a

stdout

Implementation of readProcess in terms of readCreateProcess.