ivory-0.1.0.9: Safe embedded C programming.

Safe HaskellNone
LanguageHaskell2010

Ivory.Language.Ptr

Synopsis

Documentation

type Ptr = Pointer Nullable Mutable Source #

Pointers (nullable references).

ptrToRef :: IvoryArea area => Ptr s area -> Ref s area Source #

Convert nullable to valid pointer unsafely. TODO deprecate in favor of unsafePointerCast

refToPtr :: IvoryArea area => Ref s area -> Ptr s area Source #

Convert valid to nullable pointer. TODO deprecate in favor of pointerCastToNullable

withRef :: (KnownConstancy c, IvoryArea a) => Pointer Nullable c s a -> (Pointer Valid c s a -> Ivory eff t) -> Ivory eff f -> Ivory eff () Source #

Unwrap a pointer, and use it as a reference.