Module

Perspectives.Instances.Environment

Conceptually, an Environment a is a stack of frames of a, where a is a Foreign.Object. A variable binding is added to the frame at the top of the stack. A variable is searched from the top of the stack to the bottom. The value found in the first frame with the variable name is returned. This causes variable shadowing.

#Environment

data Environment :: Type -> Type

Instances

#empty

empty :: forall a. Environment a

#_lookup

_lookup :: forall a z. Fn4 z (a -> z) String (Environment a) z

#lookup

lookup :: forall a. String -> Environment a -> Maybe a

#_pushFrame

_pushFrame :: forall a. Fn1 (Environment a) (Environment a)

#_addVariable

#addVariable

addVariable :: forall a. String -> a -> Environment a -> Environment a

#_toObjectArray

_toObjectArray :: forall a. Fn1 (Environment a) (Array (Object a))

#_fromObjectArray

Modules