Cabal- A framework for packaging Haskell software
Safe HaskellNone



Since: Cabal-2.2.0


IOData & IODataMode type

data IOData Source #

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

Since: Cabal-2.2.0


IODataText String

How Text gets encoded is usually locale-dependent.

IODataBinary ByteString

Raw binary which gets read/written in binary mode.


Instances details
NFData IOData # 
Instance details

Defined in Distribution.Utils.IOData


rnf :: IOData -> () Source #

null :: IOData -> Bool Source #

Test whether IOData is empty

Since: Cabal-2.2.0

hGetContents :: Handle -> IODataMode -> IO IOData Source #

IOData Wrapper for hGetContents

Note: This operation uses lazy I/O. Use NFData to force all data to be read and consequently the internal file handle to be closed.

Since: Cabal-2.2.0

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

IOData Wrapper for hPutStr and hClose

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

Since: Cabal-2.2.0