Safe Haskell | None |
---|---|
Language | Haskell2010 |
- with :: (FileMode mode, '[AccessError] :| err, MonadIO m) => FilePath -> IOMode -> (Handle mode -> ResultT msg err m a) -> ResultT msg err m a
- close :: MonadIO m => Handle mode -> ResultT msg err m ()
- data IOMode :: *
- class FileMode mode where
- data Handle mode
- stdin :: Handle mode
- stdout :: Handle mode
- stderr :: Handle mode
- class DescriptiveError err where
- data AccessError
- data EoF = EoF
- data OperationError
Functions
with :: (FileMode mode, '[AccessError] :| err, MonadIO m) => FilePath -> IOMode -> (Handle mode -> ResultT msg err m a) -> ResultT msg err m a Source #
See openFile
class FileMode mode where Source #
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 #
class DescriptiveError err where #
Errors
data AccessError Source #