Tue Apr 9 10:03:27 EDT 2019

Traversable, Zip

Actually, this already works:

switch ::
  (Seq m r, Traversable f, Zip f)
  => r S
  -> [(r S, m (f (r S)))]
  -> m (f (r S))
  -> m (f (r S))

I just miss the instances.

So the idea is that the data structure nesting is just "skin-deep".

I need to get deeper into Haskell stuff before I can wiggle out of
this.  The core problem seems to be that I really want to encode
signals at the type level to make it easier to work with, but that
would be a really big change.  It would be a different language.

It's possible to do gradually, but will require to build Seq on top of
Seq2, or vise versa, to make it practical (i.e. not horribly break