I'd like to have a state monad with the feature that I can somehow
annotate using the type system that some functions are only going to
read the state and not modify it. Such read-only functions are only
permitted to call other read-only functions, whereas state-modifying
functions can call both read-only and other state-modifying functions.
How can I do this? It does not seem to be straightforwardly doable
with Control.Monad.State.
--ken