zydeco-lang / zydeco

a proof-of-concept programming language based on Call-by-push-value
Other
49 stars 3 forks source link

Lack of Scope/Kind Checking let rec annotations #28

Closed maxsnew closed 1 year ago

maxsnew commented 1 year ago
let rec loop : Foo = ( ! loop );

! exit 0

Expected: Unbound type variable Foo What I get: runs fine.

LighghtEeloo commented 1 year ago

Bug confirmed. The cause was that the type validation in type annotations were not recursive. Say we've got an A type, if it's a type variable syntactically, we would check; but if it's Thunk(B), we would just let it pass.

Addressed in 7b72cae25b953e6ace61c67ff36885ca3a7c365c.

LighghtEeloo commented 1 year ago

Fixed on main.