shrun-0.9: A utility program for running shell commands concurrently.
Safe HaskellNone
LanguageGHC2021

Shrun.IO.Types

Description

Provides types for typical IO processes.

Synopsis

Documentation

newtype Stderr Source #

Newtype wrapper for stderr.

Constructors

MkStderr 

Instances

Instances details
Show Stderr Source # 
Instance details

Defined in Shrun.IO.Types

Eq Stderr Source # 
Instance details

Defined in Shrun.IO.Types

Methods

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

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

data CommandResult Source #

Result of running a command.

Instances

Instances details
Show CommandResult Source # 
Instance details

Defined in Shrun.IO.Types

Eq CommandResult Source # 
Instance details

Defined in Shrun.IO.Types

data ReadHandleResult Source #

Result from reading a handle. The ordering is based on:

ReadErr _ < ReadNoData < ReadSuccess

The Semigroup instance is based on this ordering, taking the greatest element. For identical constructors, the left argument is taken.

Constructors

ReadErr (List UnlinedText)

Error encountered while trying to read a handle.

ReadSuccess (List UnlinedText)

Successfully read data from the handle.

ReadNoData

Successfully read no data from the handle.

readHandle :: (HasCallStack, MonadCatch m, MonadHandleReader m) => Int -> Handle -> m ReadHandleResult Source #

Attempts to read from the handle.