This library provides an interface to monads that support explicit
sharing based on two-level types. This implementation is not as
efficient as the default implementation but supports a restricted
form of sharing across non-determinism if a first-order data type
is used as underlying monad.

Documentation

Classes

Yields an action that returns the same results as the given
action but whose effects are only executed once. Especially, when
the resulting action is duplicated it returns the same result at
every occurrence.

Interface of shareable nested monadic data types. The provided
function shareArgs is supposed to map the given function on every
monadic argument.

We provide instances of the Shareable class for some predefined
Haskell types. For flat types the function shareArgs just returns
its argument which has no arguments to which the given function
could be applied.

Interface for convertible datatypes. The provided function
convArgs is supposed to map the given function on every argument
of the given value and combine the results to give the converted
value.

We provide instances of the Convertible class for some predefined
Haskell types. For flat types the function convArgs just returns
its argument which has no arguments to which the given function
could be applied.