20 Aug
2006
20 Aug
'06
7:09 a.m.
Henning Thielemann writes:
On Sun, 13 Aug 2006, Marc Weber wrote:
the rand* function are examples for a typical state usage, arent'
they?
Is there any reasoon why they are not defined RandomGen g => State g a rather than RandomGen g => (a,a) -> g -> (a,g) ?
It's probably because Control.Monad.State belongs to the MTL which is outside Prelude.
On the other hand, if you are using MTL, you'd probably want a more general signature, like: (RandomGen g, MonadState g m) => m a -- David Menendez <zednenem@psualum.com> | "In this house, we obey the laws <http://www.eyrie.org/~zednenem> | of thermodynamics!"