In article <[EMAIL PROTECTED]>, Derek Elkins <[EMAIL PROTECTED]> wrote:
> M = (forall s.ST s) > R = STRef s > > e.g. runST :: (forall s.ST s a) -> a > > you can use the same trick for your own RefMonad. I'm not sure if this > will work with RefMonad exactly. If ST/STRef can be made an instance of > RefMonad without any trouble though, then I believe it should work. No, it won't work, fortunately ST is safe this way: newSTRef Nothing :: forall a s. ST s (STRef s (Maybe a)) runST (newSTRef Nothing) :: -- type error, s escapes. The type error occurs because "forall s. ST s a" cannot be matched with "forall s. ST s E" (for some type-expression E) if E contains s (which it does in this case). -- Ashley Yakeley, Seattle WA _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell