Cabal-3.2.1.0: A framework for packaging Haskell software
Safe Haskell None
Language Haskell2010

Distribution.Utils.IOData

Description

Since: 2.2.0

Synopsis

IOData & IODataMode type

data IOData Source #

Represents either textual or binary data passed via I/O functions which support binary/text mode

Since: 2.2

Constructors

IODataText String

How Text gets encoded is usually locale-dependent.

IODataBinary ByteString

Raw binary which gets read/written in binary mode.

Instances

Instances details
NFData IOData Source #
Instance details

Defined in Distribution.Utils.IOData

withIOData :: IOData -> ( forall mode. IODataMode mode -> mode -> r) -> r Source #

hPutContents :: Handle -> IOData -> IO () Source #

IOData Wrapper for hPutStr and hClose

This is the dual operation ot hGetIODataContents , and consequently the handle is closed with hClose .

Note: this performs lazy-IO.

Since: 2.2