Safe Haskell | Safe-Infered |
---|
Definition of the store.
- data Store = Store {
- storeNextLoc :: Int
- storeNextRgn :: Int
- storeRegions :: Set Rgn
- storeGlobal :: Set Rgn
- storeBinds :: Map Loc (Rgn, Type Name, SBind)
- data Loc = Loc Int
- data Rgn = Rgn Int
- data SBind
- = SObj {
- sbindDataTag :: Name
- sbindDataArgs :: [Loc]
- | SLams {
- sbindLamBinds :: [(Bool, Bind Name)]
- sbindLamBody :: Exp () Name
- | SThunk {
- sbindThunkExp :: Exp () Name
- = SObj {
- empty :: Store
- newLoc :: Store -> (Store, Loc)
- newLocs :: Int -> Store -> (Store, [Loc])
- newRgn :: Store -> (Store, Rgn)
- newRgns :: Int -> Store -> (Store, [Rgn])
- delRgn :: Rgn -> Store -> Store
- hasRgn :: Store -> Rgn -> Bool
- setGlobal :: Rgn -> Store -> Store
- addBind :: Loc -> Rgn -> Type Name -> SBind -> Store -> Store
- allocBind :: Rgn -> Type Name -> SBind -> Store -> (Store, Loc)
- allocBinds :: [[Loc] -> (Rgn, Type Name, SBind)] -> Store -> (Store, [Loc])
- lookupBind :: Loc -> Store -> Maybe SBind
- lookupTypeOfLoc :: Loc -> Store -> Maybe (Type Name)
- lookupRegionTypeBind :: Loc -> Store -> Maybe (Rgn, Type Name, SBind)
Documentation
Store | |
|
A store location.
These are pretty printed like L4#
.
A region handle.
These are pretty printed like R5#
.
Store binding. These are naked objects that can be allocated directly into the heap.
SObj | An algebraic data constructor. |
| |
SLams | Lambda abstraction, used for recursive bindings. The flag indicates whether each binder is level-1 (True) or level-0 (False). |
| |
SThunk | A thunk, used for lazy evaluation. |
|
Operators
addBind :: Loc -> Rgn -> Type Name -> SBind -> Store -> StoreSource
Add a store binding to the store, at the given location.
allocBind :: Rgn -> Type Name -> SBind -> Store -> (Store, Loc)Source
Allocate a new binding into the given region, returning the new location.