zetah11 / zippy

a smol functional/imperative programming language
MIT License
2 stars 0 forks source link

polymorphic destructuring #11

Open zetah11 opened 2 years ago

zetah11 commented 2 years ago

For the moment, the compiler only accepts polymorphic definitions with a simple Name as the pattern. This should be easy to extend to more complicated patterns, like

let x, y |T| = (a: T => a), (b: T => b)

The main challenge is (as per usual) the THIR-to-MIR step.