% Monad Transformer for Updateable State and Delayed Computations
% Sebastian Fischer (sebf@informatik.uni-kiel.de)
We define a monad transformer that turns an arbitrary instance of
`MonadPlus` into a `MonadUpdate` and a `MonadDelay`. The challenge is
to implement the interface without threading a store through monadic
computations and shared monadic computations are evaluated only once.

We define a monad transformer `UpdateT` that adds the capability of
non-deterministic state updates to arbitrary instances of
`MonadPlus`. Monadic actions in the resulting monads are data terms if
monadic actions are data terms in the base monad. As a consequence,
they are evaluated only once if they are shared.

We define another instance of `Update` where results are not returned
in the base monad but in the transformed base monad. This instance is
useful to support computations that may or may not consider the
threaded store. All upcate actions are kept in the monadic values and
threaded additionally.