Copyright | Bas van Dijk Anders Kaseorg Michael Steele |
---|---|
License | BSD-style |
Maintainer | Bas van Dijk <v.dijk.bas@gmail.com> |
Stability | experimental |
Portability | non-portable (extended exceptions) |
Safe Haskell | Safe |
Language | Haskell98 |
Foreign.Marshal.Utils.Lifted
Description
This is a wrapped version of Foreign.Marshal.Utils with types generalized
from IO
to all monads in either MonadBase
or MonadBaseControl
.
Synopsis
- with :: (MonadBaseControl IO m, Storable a) => a -> (Ptr a -> m b) -> m b
Documentation
Arguments
:: (MonadBaseControl IO m, Storable a) | |
=> a | value to be poked |
-> (Ptr a -> m b) | computation to run |
-> m b |
Generalized version of with
.
Note, when the given function throws an exception any monadic side
effects in m
will be discarded.