Theoria.Kernel.Reference.Primitive (theoria v0.4.0)

Copy Markdown View Source

Reference primitive reductions for recursor iota metadata.

Summary

Functions

Attempts one reference primitive iota reduction.

Types

defeq_fun()

@type defeq_fun() :: (Theoria.Env.t(), Theoria.Term.t(), Theoria.Term.t() ->
                  boolean())

result()

@type result() ::
  {:ok, Theoria.Term.t(), non_neg_integer()}
  | {:error, term()}
  | {:stuck, Theoria.Term.App.t()}

whnf_fun()

@type whnf_fun() :: (Theoria.Env.t(), Theoria.Term.t() ->
                 {:ok, Theoria.Term.t(), non_neg_integer()} | {:error, term()})

Functions

reduce(env, app, whnf, defeq)

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

Attempts one reference primitive iota reduction.