Theoria.Env (theoria v0.1.0)

Copy Markdown View Source

Kernel environment containing checked constants and definitions.

Summary

Types

t()

@type t() :: %Theoria.Env{constants: %{required(atom()) => Theoria.Env.Constant.t()}}

Functions

fetch(env, name)

@spec fetch(t(), atom()) :: {:ok, Theoria.Env.Constant.t()} | :error

new()

@spec new() :: t()

put_constant(env, name, type)

@spec put_constant(t(), atom(), Theoria.Term.t()) :: t()

put_definition(env, name, type, value)

@spec put_definition(t(), atom(), Theoria.Term.t(), Theoria.Term.t()) :: t()