Hi,
the following instance declaration doesn't work any
more with ghc-5.02.3, it worked before.
> newtype ST state a = ST { unST :: state -> (a,state) }
>
> instance Monad (ST c) where
> return x = ST (\state -> (x,state))
> (m >>= f) = ST (\state -> let (x,state1) = unST m state
> (y,state2) = unST (f x) state1
> in (y,state2))
Error message:
Can't handle multiple methods defined by one pattern binding
(m >>= f)
= ST (\ state
-> let
(y, state2) = ...
(x, state1) = ...
in (y, state2))
What can I do instead?
--
Christoph
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs