types/Log

Structured logs of adapton effects.

type LogOps<Name, Val, Error, Closure> = { begin : () -> (); end : LogEventTag<Name, Val, Error, Closure> -> (); take : () -> [LogEvent<Name, Val, Error, Closure>] }

The logging operations required by the adapton engine

type Log<Name, Val, Error, Closure> = [LogEvent<Name, Val, Error, Closure>]

Logs are sequences of log events.

type LogEvent<Name, Val, Error, Closure> = {#put : (Name, Val, [LogEvent<Name, Val, Error, Closure>]); #putThunk : (Name, Closure, [LogEvent<Name, Val, Error, Closure>]); #get : (Name, R.Result<Val, Error>, [LogEvent<Name, Val, Error, Closure>]); #dirtyIncomingTo : (Name, [LogEvent<Name, Val, Error, Closure>]); #dirtyEdgeFrom : (Name, [LogEvent<Name, Val, Error, Closure>]); #cleanEdgeTo : (Name, Bool, [LogEvent<Name, Val, Error, Closure>]); #cleanThunk : (Name, Bool, [LogEvent<Name, Val, Error, Closure>]); #evalThunk : (Name, R.Result<Val, Error>, [LogEvent<Name, Val, Error, Closure>])}

Log events are tree-structured, and recursive.

type LogEventTag<Name, Val, Error, Closure> = {#put : (Name, Val); #putThunk : (Name, Closure); #get : (Name, R.Result<Val, Error>); #dirtyIncomingTo : Name; #dirtyEdgeFrom : Name; #cleanEdgeTo : (Name, Bool); #cleanThunk : (Name, Bool); #evalThunk : (Name, R.Result<Val, Error>)}