teikalang / teika

MIT License
318 stars 7 forks source link

teika: integrates escape check on occurs check #178

Closed EduardoRFS closed 11 months ago

EduardoRFS commented 11 months ago

Goals

Faster escape checking and more precise error messages.

Context

Currently Teika does escape checking in the most naive way possible, by checking nothing escaped when returning a term, this is slow and will lead to error messages at the declaration site instead of where it actually happened.

So I'm switching to a level based approach where meta variables contain the lowest level where they're referenced, using this it should be possible to detect at occurs time when a variable would escape.