[<<][meta][>>][..]
Mon Aug 15 00:19:37 CEST 2011

Num SSA ?

Looks like it's time now to start regarding the SSM types as
functionals, and define operations over them.  It looks like this will
eventually lead to "d" and "z" operators in a straightforward way.

After defining:

lift2 :: (a -> b -> r) -> 
         (SSM a' a) -> 
         (SSM b' b) -> 
         (SSM (a',b') r)
lift2 op a b = fmap (uncurry op) $ par a b

I have trouble instantiating Num because of:

    Expected type: SSM i o -> SSM i o -> SSM i o
      Actual type: SSM i o -> SSM i o -> SSM (i, i) o

This is another one of those cases where the presence of an input (or
state) parameter gives trouble when we're only interested in the
output behavior.  Summarized in a hand-waving way:

  Working with things that are not "applicative" in Haskell is a pain
  because it is value-oriented.

It's fine to work in point-free style, but working in expression style
makes it quite hard to do.



[Reply][About]
[<<][meta][>>][..]