Something
public text v1 · immutableclass (Monad m) => MonadGraph m graphtype | m -> graphtype where
modify_graph:: (graphtype -> graphtype) -> m ()
current_graph :: m graphtype
put_graph :: graphtype -> m ()
MonadGraph also should support the MonadState operations.
newtype GraphMonadT graphtype m result =
GraphMonadT {
state:: StateT graphtype m result}
deriving (Monad, Monoid, MonadCont, MonadTrans, MonadFix, Functor, MonadPlus)
data GraphState graphtype s =
GraphState
{
graph::graphtype,
other_state::s
}