Sun Jan 27 11:50:56 CET 2013

Mainloop over in/out/param blocks

Find a way to lift an expression to in/param -> out notation, then see
how state fits the picture.

Let's focus on the lifting operation.  Maybe on the special case
that's already there: lift the first n inputs to a block.

Not easy..

Thing like this: what does the C processor need?  Actually we're just
abstracting that information.  Maybe this should be abstracted first
to types?

It seems that at least a little bit of the secret is in lifting the
primitives over streams, i.e. where one argument is a stream and the
other is a scalar.

The C processor needs to know:
- expression in scalar form
- difference between input and output
- difference between scalar and vector

Maybe first some refactoring needs to be done here.

Essentially, what the compiler gets is:

   (lambda (state-in vector-in scalar-in)
     .... ;; bindings
     (state-out vector-out))

state-in   : t
vector-in  : V t
scalar-in  : t
state-out  : t
vector-out : V t

with the extra information that:
  - state is fed back 
  - vector types are indexed