Advanced functions for working with Enclojure runtime.
emptyEnv : Enclojure.Common.Env io
Returns an empty environment
bindGlobal : String -> Enclojure.Common.Value io -> Enclojure.Common.Env io -> Enclojure.Common.Env io
Binds a given String
name to Value io
in the global scope of Env io
.
bindLexical : String -> Enclojure.Common.Value io -> Enclojure.Common.Env io -> Enclojure.Common.Env io
Binds a given String
name to Value io
in the lexical scope of Env io
fetchGlobal : String -> Enclojure.Common.Env io -> Maybe (Enclojure.Common.Value io)
Fetches a value by name from the global scope
fetchLexical : String -> Enclojure.Common.Env io -> Maybe (Enclojure.Common.Value io)
Fetches a value by name from the lexical scope
setCurrentStackFrameLocation : Enclojure.Located.Location -> Enclojure.Common.Env io -> Enclojure.Common.Env io
Overwrites the location of the current stack frame in a given environment.
prettyTrace : Enclojure.Common.Exception -> List String
Return a "prettified" stack trace for an exception.
throw : Enclojure.Common.Env io -> Enclojure.Common.Exception -> Enclojure.Common.Exception
Assigns the stack from the given environment to the exception.
const : Enclojure.Common.Value io -> Enclojure.Common.IO io
Indicates that the returned value is a constant.
sideEffect : io -> Enclojure.Common.IO io
Indicates that the returned value is a side effect.
addAtom : Enclojure.Common.Value io -> Enclojure.Common.Env io -> ( Enclojure.Common.Env io, Basics.Int )
Adds a new atom containing a provided value to the environment. Returns a tuple of the updated environment and the generated atom id.
deref : Enclojure.Common.Ref io -> Enclojure.Common.Env io -> Enclojure.Common.Value io
Dereferences given Ref io
in Env io
.
resetAtom : Basics.Int -> Enclojure.Common.Value io -> Enclojure.Common.Env io -> Enclojure.Common.Env io
Resets an atom identified by Int
id to value Value io
in the given environment Env io
.
apply : Enclojure.Located.Located (Enclojure.Common.Value io) -> Enclojure.Located.Located (Enclojure.Common.Value io) -> Enclojure.Common.Env io -> Enclojure.Common.Continuation io -> Enclojure.Located.Located (Enclojure.Common.Step io)
Attempts to interpret the first argument as a function and the second argument as a list of its arguments.
terminate : Enclojure.Located.Located (Enclojure.Common.Value io) -> Enclojure.Common.Env io -> Enclojure.Located.Located (Enclojure.Common.Step io)
Returns a continuation that terminates the program.