Local Constant
A local constant is one that is defined inside a function definition. A local constant definition may be bound to any expression whatsoever, including one that refers to variables and arguments. Its type is the same as the inferred type of the expression. The local constant definition itself is a statement, and therefore its inferred type is ⊤
.
Grammar: [ foo ::= bar; ];
Example: rng ::= a pRNG;
References:
- Local Constants in the Guess-The-Number tutorial
- Local Constants discussed with regards to type inference
- Local Constants and compile-time ambiguity in the Hilbert Hotel tutorial