* Anton Kholomiov <[email protected]> [2012-06-16 17:59:23+0400] > It's class for strict and lazy states. Maybe it's better > to take approach of containers (the same interface and different modules)?
The lazy and strict State monads differ only in their >>= operator. Since you don't have control over importing the Monad instance, those two have to be different types. The reason why put/get/modify are in a class is to allow them to be used not just with State, but also with any monad stack that has a State inside, like `ReaderT e (State s)`. -- Roman I. Cheplyaka :: http://ro-che.info/ _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
