chain-fs-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Chain.Fs

Contents

Synopsis

Functions

with :: (FileMode mode, '[AccessError] :| err, MonadIO m) => FilePath -> IOMode -> (Handle mode -> ResultT msg err m a) -> ResultT msg err m a Source #

close :: MonadIO m => Handle mode -> ResultT msg err m () Source #

class FileMode mode where Source #

Minimal complete definition

open, getLine, get, put

Methods

open :: ('[AccessError] :| err, MonadIO m) => FilePath -> IOMode -> ResultT msg err m (Handle mode) Source #

getLine :: ('[OperationError, EoF] :| err, MonadIO m) => Handle mode -> ResultT msg err m mode Source #

get :: ('[OperationError] :| err, MonadIO m) => Handle mode -> ResultT msg err m mode Source #

put :: ('[OperationError] :| err, MonadIO m) => Handle mode -> mode -> ResultT msg err m () Source #

Instances

FileMode ByteString Source # 

Methods

open :: ((* ': AccessError) [*] :| err, MonadIO m) => FilePath -> IOMode -> ResultT msg err m (Handle ByteString) Source #

getLine :: ((* ': OperationError) ((* ': EoF) [*]) :| err, MonadIO m) => Handle ByteString -> ResultT msg err m ByteString Source #

get :: ((* ': OperationError) [*] :| err, MonadIO m) => Handle ByteString -> ResultT msg err m ByteString Source #

put :: ((* ': OperationError) [*] :| err, MonadIO m) => Handle ByteString -> ByteString -> ResultT msg err m () Source #

FileMode Text Source # 

Methods

open :: ((* ': AccessError) [*] :| err, MonadIO m) => FilePath -> IOMode -> ResultT msg err m (Handle Text) Source #

getLine :: ((* ': OperationError) ((* ': EoF) [*]) :| err, MonadIO m) => Handle Text -> ResultT msg err m Text Source #

get :: ((* ': OperationError) [*] :| err, MonadIO m) => Handle Text -> ResultT msg err m Text Source #

put :: ((* ': OperationError) [*] :| err, MonadIO m) => Handle Text -> Text -> ResultT msg err m () Source #

data Handle mode Source #

Errors

data EoF Source #

Constructors

EoF 

Instances