Tue Jun 5 20:56:12 EDT 2018

Tagless-Final and representations

For a * -> * type f, the represention might have

   f (r t) <-> r (f t)

Which moves between the concrete metalevel construct on the lhs, and
the abstract construct on the right.

Specifying transformations like that is essentially what the design of
the embedded language entails.

For languages that do not have lambda/apply, it appears to be
sufficient to define some first order control structures.

I wonder if I can write Bachus' functional forms for the state machine


Practically, I want a RAI-style loop, with the ability to have
intermediate vectors.  How to formalize?


Yeah maybe not really...

It's mostly about being able to bind intermediate arrays, to be able
to do multipass algorithms, which is not something RAI can do for some

An essential part here is to have arrays as units of representation,
and with that the representations of higher order functions that
operate on them.  Not so much an issue for the PRU and Seq code, as
there is no "vector level" to work with.  Everything needs to be

But still it might be possible to use a staapl-style approach, where
higher order things can be passed around freely at the meta-level, but
get instantiated.  E.g. a there would be a way to represent a lambda
abstraction, but no way to leave it as a value in the code.  It has to
be applied.

How to express that?