cogent
cogent copied to clipboard
lambda term cannot access toplevel constants
Defined constants cannot be used in lambda expressions. The docs say "no free variables", but is it really intended that this also applies to toplevel defined constants?
Example:
c : U32
c = 0
f : () -> U32
f () = (\() => c) ()
causes the error message:
Parsing...
Resolving dependencies...
Typechecking...
cogent: TODO: closures not implemented
It works if a defined function is used instead.