Hi,
After a lot of thinking, I can't get what I
am doing wrong in this code:
--
data ( RandomGen g ) = RandomMonad g a = RandomMonad (g - a)
instance Monad (RandomMonad g) where
return = RandomMonad . const
RandomMonad f1 = f2 = RandomMonad f3 where
f3 a = f2f1 a (next a)
On Fri, 31 Oct 2008, Mauricio wrote:
Hi,
After a lot of thinking, I can't get what I
am doing wrong in this code:
--
data ( RandomGen g ) = RandomMonad g a = RandomMonad (g - a)
RandomGen g is considered the constraint for the application of
RandomMonad constructor, but GHC does not
On Fri, 31 Oct 2008, Jonathan Cast wrote:
On Fri, 2008-10-31 at 18:43 -0200, Mauricio wrote:
Hi,
After a lot of thinking, I can't get what I
am doing wrong in this code:
--
data ( RandomGen g ) = RandomMonad g a = RandomMonad (g - a)
instance Monad (RandomMonad g) where
return =
On Fri, 2008-10-31 at 18:43 -0200, Mauricio wrote:
Hi,
After a lot of thinking, I can't get what I
am doing wrong in this code:
--
data ( RandomGen g ) = RandomMonad g a = RandomMonad (g - a)
instance Monad (RandomMonad g) where
return = RandomMonad . const
RandomMonad f1 =