How to combine two different monads
问题 I'm testing a REST server. I hit it in the IO monad and simulate it in State Db where Db tracks the supposed state of the server. The following function is supposed to run both versions and compare the results... check :: (Eq a, MonadState d s) => s a -> IO a -> s (IO Bool) -- or: check :: (Eq a, MonadState d s, MonadIO i) => s a -> i a -> s (i Bool) check _ _ = (return.return) False -- for now but when I try it with these simplest possible functions ... simReset :: State Db () realReset ::