types/Graph
Representation of engine state.
type Store<Name, Val, Error, Closure> = H.HashMap<Name, Node<Name, Val, Error, Closure>>
type Node<Name, Val, Error, Closure> = {#ref : Ref<Name, Val, Error, Closure>; #thunk : Thunk<Name, Val, Error, Closure>}
type Stack<Name> = L.List<Name>
type EdgeBuf<Name, Val, Error, Closure> = Buffer.Buffer<Edge<Name, Val, Error, Closure>>
type Ref<Name, Val, Error, Closure> = { content : Val; incoming : EdgeBuf<Name, Val, Error, Closure> }
type Thunk<Name, Val, Error, Closure> = { closure : Closure; result : ?R.Result<Val, Error>; outgoing : [Edge<Name, Val, Error, Closure>]; incoming : EdgeBuf<Name, Val, Error, Closure> }
type Edge<Name, Val, Error, Closure> = { dependent : Name; dependency : Name; checkpoint : Action<Val, Error, Closure>; var dirtyFlag : Bool }
type Action<Val, Error, Closure> = {#put : Val; #putThunk : Closure; #get : R.Result<Val, Error>}
type Context<Name, Val, Error, Closure> = { var edges : EdgeBuf<Name, Val, Error, Closure>; var stack : Stack<Name>; var store : Store<Name, Val, Error, Closure>; var logOps : Log.LogOps<Name, Val, Error, Closure>; evalOps : E.EvalOps<Name, Val, Error, Closure>; var evalClosure : ?E.EvalClosure<Val, Error, Closure> }