Albalib.Build_contextSourceA build context consists of a context with holes and a stack of to be constructed terms.
There is always a next to be constructed term. The term is either in a function position or an argument position.
make gamma
Make a build context based on gamma. Push 2 holes onto the context to get
Gamma, E: Any(2), e: E
The next to be constructed term points to e.
val final :
t ->
(t * Alba_core.Term.t * Alba_core.Term.typ,
int list * Alba_core.Term.typ * Alba_core.Gamma.t)
resultbase_candidate range variant term nargs bc
Receive the term term as a candidate for the next to be constructed term. The candidate is from the base context and in applied to nargs arguments.
Base candidates are either
bound level nargs bc
Add a bound variable based on the last argument type and push a placeholder for the next argument type or the result type. I.e. expect the next argument type or the result type.
all (a: A) ... : RTexp: tpf a b c ... \ x y ... := texp where f ... := valueThe where expression
exp where
f := valueis treated like
(\f := exp) valuei.e.
Appl ( Lambda (f, F, exp), value)i.e. a beta redex, and finally converted to
Where (f, F, exp, value)