LLocal : FC -> (0 _ : IsVar x idx vars) -> Lifted vars A local variable in the lambda-lifted syntax tree.
@ idx is the index that the variable can be found at in the syntax
tree's current scope.
@ p is evidence that indexing into vars with idx will provide the
correct variable.
LAppName : FC -> Maybe LazyReason -> Name -> List (Lifted vars) -> Lifted vars A known function applied to exactly the right number of arguments.
Back-end runtimes should be able to utilise total applications
effectively, and so they are given a specific constructor here.
@ lazy is used to signify that this function application is lazy,
and, if so, the reason for lazy application.
@ n is the name of the function to be invoked.
@ args is the list of arguments for the function call.
LUnderApp : FC -> Name -> Nat -> List (Lifted vars) -> Lifted vars A known function applied to fewer arguments than its arity.
Situations described by this constructor will likely be handled by
by runtimes by creating a closure which waits for the remaining
arguments.
@ n is the name of the function to be (eventually) invoked.
@ missing is the number of arguments missing from this application.
@ args is a list of the arguments known at this point in time.
LApp : FC -> Maybe LazyReason -> Lifted vars -> Lifted vars -> Lifted vars A closure applied to one more argument.
This given argument may be the last one that the closure is waiting
on before being able to run; runtimes should check for such a
situation, and run the function if it is now fully applied.
@ lazy is used to signify that this function application is lazy,
and, if so, the reason for lazy application.
@ closure is the closure being applied.
@ arg is the extra argument being given to the closure.
LLet : FC -> (x : Name) -> Lifted vars -> Lifted (x :: vars) -> Lifted vars A let binding: binding a new name to an existing expression.
Roughly, this constructor represents code of the form:
```idris
let
x = expr
in
body
```
@ x is the new name to bind.
@ expr is the expression to bind `x` to.
@ body is the expression to evaluate after binding.
LCon : FC -> Name -> ConInfo -> Maybe Int -> List (Lifted vars) -> Lifted vars Use of a constructor to construct a compound data type value.
@ n is the name of the data type.
@ info is information about the constructor.
@ tag is the tag value for the construction, if the type is an
algebraic data type.
@ args is the list of arguments for the constructor.
LOp : FC -> Maybe LazyReason -> PrimFn arity -> Vect arity (Lifted vars) -> Lifted vars An operator applied to operands.
@ arity is the arity of the operator.
@ lazy is used to signify that this operation is lazy, and, if so,
the reason for lazy application.
@ op is the operator being used.
@ args is a vector containing the operands of the operation.
LExtPrim : FC -> Maybe LazyReason -> Name -> List (Lifted vars) -> Lifted vars A second, more involved, form of primitive operation, defined using
`%extern` pragmas.
Backends should cause a compile-time error when encountering an
unimplemented LExtPrim operation.
@ lazy is used to signify that this operation is lazt, and, if so,
the reason for lazy application.
@ p is the name of the operator being used.
@ args is a list of operands for the operation.
LConCase : FC -> Lifted vars -> List (LiftedConAlt vars) -> Maybe (Lifted vars) -> Lifted vars A case split on constructor tags.
@ expr is the value to match against.
@ alts is a list of the different branches in the case statement.
@ def is an (optional) default branch, taken if no branch in alts is
taken.
LConstCase : FC -> Lifted vars -> List (LiftedConstAlt vars) -> Maybe (Lifted vars) -> Lifted vars A case split on a constant expression.
@ expr is the expression to match against.
@ alts is a list of the different branches in the case statement.
@ def is an (optional) default branch, taken if no branch in alts is
taken.
LPrimVal : FC -> Constant -> Lifted vars A primitive (constant) value.
LErased : FC -> Lifted vars An erased value.
LCrash : FC -> String -> Lifted vars A forceful crash of the program.
This kind of crash is generated by the Idris 2 compiler; it is
separate from crashes explicitly added to code by programmers (for
example via `idris_crash`).
@ msg is a message emitted when crashing that might be useful for
debugging.