Order of declarations
For the purposes of sorting term declarations based on their
dependencies, terms can be partially ordered
based on the terms to which they refer statically. That is, if
a term t₀ refers statically to
term t₁, then
t₁ < t₀.
Terms do not have to be declared in any given order. That is,
if a term t₀ refers statically
to term t₁ in the same module,
there is no requirement that t₁
be declared before t₀.
Terms are sorted topologically prior to any evaluation based
on the given partial order relation, and the
restrictions on
recursion
ensure that it is always possible to sort terms in the order
of their dependencies.
Syntax
The precise syntax of term_declarations
is given by the following EBNF: