ivory-0.1.0.0: Safe embedded C programming.

Safe HaskellNone

Ivory.Language.Ptr

Synopsis

Documentation

newtype Ptr s a Source

Pointers (nullable references).

Constructors

Ptr 

Fields

getPtr :: Expr
 

Instances

IvoryArea area => IvoryExpr (Ptr s area) 
IvoryArea area => IvoryVar (Ptr s area) 
IvoryArea area => IvoryType (Ptr s area) 
IvoryArea area => IvoryEq (Ptr s area) 
IvoryArea a => IvoryStore (Ptr Global a) 
IvoryArea area => IvoryInit (Ptr Global area) 
IvoryArea area => IvoryZero (Stored * (Ptr Global area)) 

nullPtr :: IvoryArea area => Ptr s areaSource

refToPtr :: IvoryArea area => Ref s area -> Ptr s areaSource

Convert a reference to a pointer. This direction is safe as we know that the reference is a non-null pointer.

ptrToRef :: IvoryArea area => Ptr s area -> Ref s areaSource