[Haskell-cafe] Polymorphic function over pairs of maybes.

Sterling Clover s.clover at gmail.com
Tue Dec 28 22:50:08 CET 2010

> Basically, I have a signal processing loop, where values are passed
> updated with a Maybe, representing whether there is or is not a change
> to the value. I could use a single Maybe around the whole thing, but
> that would require then re-updating a potentially large structure
> entirely. I want to be able to build a combinator that can combine two
> signal-fetching actions into a larger one:
> IO (Maybe a) -> IO (...) -> IO (Maybe a, (...))
> and then an action that could, given the previous value:
> (a, (...))
> update any places in this chain of pairs where the Maybe is not Nothing.

Sounds like you want a generic diff: http://hackage.haskell.org/package/gdiff-1.0


More information about the Haskell-Cafe mailing list