zetah11 / zippy

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

imprecise partial evaluation #25

Open zetah11 opened 1 year ago

zetah11 commented 1 year ago

When the elaborator evaluates code like

let x = f 5
fun f (x: 10) : 10 = x

it generates a late init for x which immediately returns, when it really should generate a static value. This means that non-trivial bounds in range types will generate error messages in the backend for being unevaluated number expressions.