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
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