Wed Aug 19 00:22:46 EDT 2015
Feldspar fusion trick
data Vector a = Indexed (Data Length) (Data Ix -> a)
map f (Indexed l ixf) = Indexed l (f . ixf)
A good idea of feldspar is to stick to C-like semantics:
for, while, if.
Something I noticed in RAI is the frequent use of (Int -> t) maps,
i.e. arrays of generated objects. For loops are handy for this.
Instead of implementing Fold, it might be better to have indexable
vectors and Feldspar's for.
Actually, non-linear indexing is quite essential.
- vector representation / fusion (keep indexing!)
- embracing for / while
In the references, an interesting language is SequenceL, which has
automatic lifting (in the sense of Conal Eliott's beautiful