samth/var — Issue #4: Is flat-check needed?
Author: dvanhorn
Created: 2011-10-22 04:58:51+00:00
State: open

Is there any value in doing a flat-check of an `(and/c FLAT_1 FLAT_2)` compared to just doing the `(FLAT_1 <= (FLAT_2 <= []))` expansion as in the higher-order case? Same for `or/c`?

Likewise, we have the `flat-check` of a flat `rec/c` unroll and recur, which is equivalent to what would happen if you let the reduction rule for (HO) `rec/c` unroll and then `flat-check`.

This would simplify the reduction relation (no need to work hard to make the flat-check and higher-order rules non-overlapping) and most of `flat-check` just goes away. Maybe even all but the predicate case, which you could then just inline. At which point I wonder if the `HOC` vs `FLAT` distinction is strictly a static notion that you don't need to pay attention to at run-time (you just assume the `or/c` invariant and shit works out).