lifted-base-0.2.3.8: lifted IO operations from the base library

CopyrightBas van Dijk, Anders Kaseorg, Michael Steele
LicenseBSD-style
MaintainerBas van Dijk <v.dijk.bas@gmail.com>
Stabilityexperimental
Portabilitynon-portable (extended exceptions)
Safe HaskellSafe
LanguageHaskell98

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

Documentation

with Source #

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.