
9 Mar
2011
9 Mar
'11
3:41 p.m.
On Wed, 9 Mar 2011, Yves Parès wrote:
Hello,
I am trying to make a monad that uses ST internally. But even when reducing this to the simplest case I'm still cramped by the 's' phantom type :
{-# LANGUAGE Rank2Types #-}
newtype MyST a = MyST (forall s. ST s a) -- ^ I cannot use " deriving (Monad) " through GeneralizedNewtypeDeriving
Would it make sense to make the 's' type explicit? newtype MyST s a = MyST (ST s a)