Sat May 26 16:06:30 EDT 2018

Traces that do not have generators

Trying to get a in input sequence fed into a trace.  Getting into a
knot with that..

Maybe it's easier to embed a sequence right into the fabric, as a
special kind of update equation around a register?

Basically, I want to use the second operand of 'next' to magically
produce a value such that the output register state contains
information to compute the next value, and 'val' produces the current

  -- register drive
  next (R (Reg sz _ a)) (R b) = do
    vb <- val b
    let ifConflict _ old = error $ "Register conflict: " ++ show (a,old,vb)
    modify $ appOut $ insertWith ifConflict a vb

Can't wrap my head around it.  Seems inconsistent.

What is the real problem?  To distill the initial state of registers.

Is there a more direct way to compile this to (s, s->s) ?