Conceptually, this library provides a way to arbitrarily extend the global state represented by the IO monad. Viewed another way, this library provides a basic facility for setting and retrieving values from global variables.
The interface takes the form of a very basic key-value store, with
multiple different stores made available through the
function. Stores are referenced by arbitrary strings, and keys
within those stores are treated likewise. The
delValue functions allow you to store, retrieve, and delete
data from the store.
Internally, data is stored within an IORef which is created using the
'unsafePerformIO hack', but this is hidden within the library so that
it can easily be modified if and when a more
proper solution is
Put a value into the given data-store.
Get a value from the given data-store, if it exists. If it
doesn't exist, obviously,
Nothing will be returned.
Get a value from the given store, with a default if it doesn't exist.