const-0: Read-only mutable primitives

Copyright(c) 2019 Edward Kmett
LicenseBSD-2-Clause OR Apache-2.0
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell2010

Foreign.Const.Marshal.Utils

Description

 

Documentation

withConst :: forall a b. Storable a => a -> (ConstPtr a -> IO b) -> IO b Source #

newConst :: forall a. Storable a => a -> IO (ConstPtr a) Source #

copyBytesAt :: forall a p. APtr p => Ptr a -> p a -> Int -> IO () Source #

moveBytesAt :: forall a p. APtr p => Ptr a -> p a -> Int -> IO () Source #

maybeNewA :: forall a b p. APtr p => (a -> IO (p b)) -> Maybe a -> IO (p b) Source #

maybePeekA :: forall a b p. APtr p => (p a -> IO b) -> p a -> IO (Maybe b) Source #

maybeWithA :: forall a b c p. APtr p => (a -> (p b -> IO c) -> IO c) -> Maybe a -> (p b -> IO c) -> IO c Source #