17 lines
505 B
Plaintext
17 lines
505 B
Plaintext
type t = Reducer_T.context
|
|
|
|
let defaultEnvironment: Reducer_T.environment = DistributionOperation.defaultEnv
|
|
|
|
let createContext = (stdLib: Reducer_Namespace.t, environment: Reducer_T.environment): t => {
|
|
{
|
|
frameStack: list{},
|
|
bindings: stdLib->Reducer_Bindings.fromNamespace->Reducer_Bindings.extend,
|
|
environment: environment,
|
|
inFunction: None,
|
|
}
|
|
}
|
|
|
|
let currentFunctionName = (t: t): string => {
|
|
t.inFunction->E.O2.fmap(Reducer_Lambda_T.name)->E.O2.default(Reducer_T.topFrameName)
|
|
}
|