acquire-0.2: Abstraction over management of resources

Safe HaskellNone
LanguageHaskell2010

Acquire.Acquire

Synopsis

Documentation

newtype Acquire resource Source #

Constructors

Acquire (IO (resource, IO ())) 

Instances

Monad Acquire Source # 

Methods

(>>=) :: Acquire a -> (a -> Acquire b) -> Acquire b #

(>>) :: Acquire a -> Acquire b -> Acquire b #

return :: a -> Acquire a #

fail :: String -> Acquire a #

Functor Acquire Source # 

Methods

fmap :: (a -> b) -> Acquire a -> Acquire b #

(<$) :: a -> Acquire b -> Acquire a #

Applicative Acquire Source # 

Methods

pure :: a -> Acquire a #

(<*>) :: Acquire (a -> b) -> Acquire a -> Acquire b #

liftA2 :: (a -> b -> c) -> Acquire a -> Acquire b -> Acquire c #

(*>) :: Acquire a -> Acquire b -> Acquire b #

(<*) :: Acquire a -> Acquire b -> Acquire a #

MonadIO Acquire Source # 

Methods

liftIO :: IO a -> Acquire a #