hackworthltd / primer

A pedagogical functional programming language.
GNU Affero General Public License v3.0
14 stars 1 forks source link

Incremental typechecking #127

Open dhess opened 4 years ago

dhess commented 4 years ago

See https://github.com/hackworthltd/vonnegut/pull/82#issue-514664673

hmac commented 4 years ago

Our current approach is to blindly apply an action and then perform a full typechecking pass, and abort if that fails. This guarantees that we will never apply an action that causes a type error but is extremely inflexible and inefficient. Hazelnut is smarter than this, inserting holes where necessary to ensure that the action can be applied whilst maintaining type correctness. We want to do something similar.

The current approach I have in mind is twofold:

There are at least two difficulties with this approach: