ivory-0.1.0.3: Safe embedded C programming.

Safe HaskellNone
LanguageHaskell2010

Ivory.Language.MemArea

Synopsis

Documentation

newtype AreaInitM a Source

This is used to generate fresh names for compound initializers.

Constructors

AreaInitM 

areaInit :: String -> Init area -> (Init, [Binding]) Source

data MemArea area Source

Externally defined memory areas.

bindingArea :: Bool -> Binding -> Area Source

Create an area from an auxillary binding.

area :: forall area. (IvoryArea area, IvoryZero area) => Sym -> Maybe (Init area) -> MemArea area Source

Define a global constant. Requires an IvoryZero constraint to ensure the area has an initializers, but does not explicilty initialize to 0 so that the value is placed in the .bss section.

importArea :: IvoryArea area => Sym -> String -> MemArea area Source

Import an external symbol from a header.

newtype ConstMemArea area Source

Constructors

ConstMemArea (MemArea area) 

constArea :: forall area. IvoryArea area => Sym -> Init area -> ConstMemArea area Source

Constant memory area definition.

importConstArea :: IvoryArea area => Sym -> String -> ConstMemArea area Source

Import an external symbol from a header.

class IvoryAddrOf mem ref | mem -> ref, ref -> mem where Source

Turn a memory area into a reference.

Methods

addrOf :: IvoryArea area => mem area -> ref Global area Source