google-research / dex-lang

Research language for array processing in the Haskell/ML family
BSD 3-Clause "New" or "Revised" License
1.58k stars 106 forks source link

Teach CheckType to check that `Dest`s are actually used linearly #1285

Closed axch closed 1 year ago

axch commented 1 year ago

This is self-check in the compiler, confirming that destination-passing isn't generating code that violates its intended invariants.

As written, there are two problems: