Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New syntax for
#%deforestable
distinguishing floe
positions
Based on recent discussions, as a general maxim: Our core language should be rich enough to express desired optimizations. Initially, as this wasn't the case, we were performing deforestation by matching host language forms. This of course meant that we were constrained to Racket syntax in such functional operations. Now that we are broadening our core language to express deforestation, in keeping with the above maxim, we would prefer to support Qi syntax in function positions in these operations. Towards this goal, this new syntax for the `#%deforestable` core form introduces support for `floe` positions. Right now, it simply segregates arguments into `expr` and `floe` positions so that these are appropriately expanded. The code generation still matches the name of the functional list transformation (e.g. `map`, `filter`) and "hardcodes" the known invocation of the corresponding underlying operation. Eventually we hope to make deforestation user-extensible to arbitrary functional list (at least) operations. At that stage, we wouldn't have this kind of standard information that we could leverage during code generation, so we will need to modify the syntax of `#%deforestable` to encode enough information to be able to perform appropriate code generation for arbitrary user-defined operations. We are not there yet :)
- Loading branch information