Well, I want to hide the fact that I&#39;m using ST, so if I can hide the existential type &#39;s&#39; it is better.<br><br>BTW, does someone know why the ST default implementation (the one exposed by <a href="http://Control.Monad.ST">Control.Monad.ST</a>) is strict, whereas those of State et Writer are lazy?<br>

<br><br><div class="gmail_quote">2011/3/9 Henning Thielemann <span dir="ltr">&lt;<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im"><br>
On Wed, 9 Mar 2011, Yves Parès wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I am trying to make a monad that uses ST internally.<br>
But even when reducing this to the simplest case I&#39;m still cramped by the &#39;s&#39; phantom<br>
type :<br>
<br>
{-# LANGUAGE Rank2Types #-}<br>
<br>
newtype MyST a = MyST (forall s. ST s a)<br>
-- ^ I cannot use &quot; deriving (Monad) &quot; through GeneralizedNewtypeDeriving<br>
</blockquote>
<br></div>
Would it make sense to make the &#39;s&#39; type explicit?<br>
<br>
newtype MyST s a = MyST (ST s a)<br>
<br>
</blockquote></div><br>