Theoria.Normalize.Primitive (theoria v0.7.0)

Copy Markdown View Source

Primitive weak-head reductions for declarations with iota metadata.

Summary

Types

fuel()

@type fuel() :: Theoria.Normalize.Fuel.t()

result()

@type result() :: whnf_result() | {:stuck, Theoria.Term.App.t()}

whnf_fun()

@type whnf_fun() :: (Theoria.Env.t(), Theoria.Term.t() -> whnf_result())

whnf_result()

@type whnf_result() :: {:ok, Theoria.Term.t(), fuel()} | {:error, Theoria.Error.t()}

Functions

reduce(env, app, whnf)

@spec reduce(Theoria.Env.t(), Theoria.Term.App.t(), whnf_fun()) :: result()