CUTE-Lang / miniCUTE

Basic compiler for a simpler version of CUTE Lang
https://CUTE-Lang.github.io/miniCUTE
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Lifting uncompilable expressions #145

Open Ailrun opened 4 years ago

Ailrun commented 4 years ago

Is your feature request related to a problem? Please describe. The G-Machine transpiler cannot compile a few expressions:

Those expressions cannot be compiled without extra steps like a lifting step for those expressions. Such a lifting step is not hard to implement, and it helps us to limit the types of runtime heap nodes. miniCUTE already implements a lambda lifting function, but it is only a part of aforementioned expressions.

By implementing this we can also close #57.

Describe the solution you'd like Implementing lifting functions for other uncompilable expressions.

Ailrun commented 4 years ago
Ailrun commented 4 years ago

Idea: treat all others as syntactic sugars of appropriate lambda expressions, and using already-implemented lambda lifting.