Mon Aug 17 10:21:34 EDT 2015

Pair again

It's giving me trouble.  Since this is just a bijection, should I
refrain from any "meta" constructs, e.g. never use (r a, r b) except
for plumbing functions, and always use r (a, b) in the interfaces?

This would make the embedding possibly more difficult.  Otoh this
could be solved in a single pack/unpack wrapper around body

Should state be representable?

It seems like the cleanest solution, so let's do that and see how it
propagates down to the DSL.

Pushing the applicative under the representation does give weird
things like:

joinSignal ::
--       (r s -> m (r s, r (m o))
--    -> (r s -> m (r s, r o))

I'm going to abor the effort.  Something is not right in how this all
fits together.

Why is this so complicated?

I'm copying what I have and will restore.

EDIT: Applicative is necessary for building "meta structures".  This
is why it needs to be "outside" the representation.

So need to find a different way to express time behavior.

Also: Code is not a Functor: it's a phantom type wrapping a
non-parameterized Term type.

All this is an intricate play, isn't it?