Copyright | (c) 2019 Edward Kmett |
---|---|
License | BSD-2-Clause OR Apache-2.0 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- data ConstForeignPtr a
- constForeignPtr :: AForeignPtr fp => fp a -> ConstForeignPtr a
- type AForeignPtr = Constable ConstForeignPtr
- newConstForeignPtr :: forall p a. APtr p => FinalizerPtr a -> p a -> IO (ConstForeignPtr a)
- newConstForeignPtr_ :: forall p a. APtr p => p a -> IO (ConstForeignPtr a)
- castConstForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> ConstForeignPtr b
- plusConstForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> Int -> ConstForeignPtr b
- newConstForeignPtrEnv :: forall p env a. APtr p => FinalizerEnvPtr env a -> Ptr env -> p a -> IO (ConstForeignPtr a)
- withConstForeignPtr :: forall fp a r. AForeignPtr fp => fp a -> (ConstPtr a -> IO r) -> IO r
- type family Unforeign (fp :: Type -> Type) :: Type -> Type
- plusAForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> Int -> fp b
- withAForeignPtr :: forall fp a r. (AForeignPtr fp, APtr (Unforeign fp)) => fp a -> (Unforeign fp a -> IO r) -> IO r
- addAForeignPtrFinalizer :: forall fp a. AForeignPtr fp => FinalizerPtr a -> fp a -> IO ()
- addAForeignPtrFinalizerEnv :: forall fp env a. AForeignPtr fp => FinalizerEnvPtr env a -> Ptr env -> fp a -> IO ()
- finalizeAForeignPtr :: forall fp a. AForeignPtr fp => fp a -> IO ()
- touchAForeignPtr :: forall fp a. AForeignPtr fp => fp a -> IO ()
Documentation
data ConstForeignPtr a Source #
Instances
constForeignPtr :: AForeignPtr fp => fp a -> ConstForeignPtr a Source #
type AForeignPtr = Constable ConstForeignPtr Source #
const foreign pointer operations
newConstForeignPtr :: forall p a. APtr p => FinalizerPtr a -> p a -> IO (ConstForeignPtr a) Source #
newConstForeignPtr_ :: forall p a. APtr p => p a -> IO (ConstForeignPtr a) Source #
castConstForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> ConstForeignPtr b Source #
plusConstForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> Int -> ConstForeignPtr b Source #
newConstForeignPtrEnv :: forall p env a. APtr p => FinalizerEnvPtr env a -> Ptr env -> p a -> IO (ConstForeignPtr a) Source #
withConstForeignPtr :: forall fp a r. AForeignPtr fp => fp a -> (ConstPtr a -> IO r) -> IO r Source #
const-preserving foreign pointer operations
type family Unforeign (fp :: Type -> Type) :: Type -> Type Source #
Instances
type Unforeign ForeignPtr Source # | |
Defined in Foreign.Const.ForeignPtr | |
type Unforeign ConstForeignPtr Source # | |
Defined in Foreign.Const.ForeignPtr |
plusAForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> Int -> fp b Source #
withAForeignPtr :: forall fp a r. (AForeignPtr fp, APtr (Unforeign fp)) => fp a -> (Unforeign fp a -> IO r) -> IO r Source #
const agnostic foreign pointer operations
addAForeignPtrFinalizer :: forall fp a. AForeignPtr fp => FinalizerPtr a -> fp a -> IO () Source #
addAForeignPtrFinalizerEnv :: forall fp env a. AForeignPtr fp => FinalizerEnvPtr env a -> Ptr env -> fp a -> IO () Source #
finalizeAForeignPtr :: forall fp a. AForeignPtr fp => fp a -> IO () Source #
touchAForeignPtr :: forall fp a. AForeignPtr fp => fp a -> IO () Source #