google-research / dex-lang

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

Generalize our generalization system to handle data arguments. #1238

Closed dougalm closed 1 year ago

dougalm commented 1 year ago

This treats ordinary data arguments as a special case of static type/dict args where "generalization" just means hoisting the entire argument to become a runtime arg. It's both more general and less code than before! Now we can interleave data/non-data args in @noinline functions. Fixes #1229 and gets us closer to being able to put @noinline on everything default.