zydeco-lang/zydeco

Definitions can't refer to prior definitions

maxsnew opened this issue · 2 comments

define f = { fn (x: Int) -> ret x };
define g = { ! f 0 };
do y <- ! g; ! exit y

Expected behavior: Exits with 0
Actual behavior: Error: "Unbound variable f (Info: Ann)"

Currently only definitions with type annotations will get recognized. I think we can discuss that and reimplement define with a better design in mind.

Should have been resolved by now...