On Sun, Oct 26, 2008 at 8:17 AM, Paul L <[EMAIL PROTECTED]> wrote:
> Thanks very much for the explanation, I now have a better understanding.
I'm glad I could help.
> On 10/26/08, David Menendez <[EMAIL PROTECTED]> wrote:
> ..[snipped]..
>> It may be helpful to rewrite the types with a more expli
Thanks very much for the explanation, I now have a better understanding.
On 10/26/08, David Menendez <[EMAIL PROTECTED]> wrote:
..[snipped]..
> It may be helpful to rewrite the types with a more explicit notation.
> For example,
>
> runST :: (a :: *) -> ((s :: *) -> ST s a) -> a
>
> mapST_wrong ::
On Sat, 25 Oct 2008, Paul L wrote:
I'm have some trouble using the ST monad, and I think
I'm confused about its use of existential type.
{-# OPTIONS -XRankNTypes #-}
import Control.Monad.ST
import Data.Array.ST
I want to implement a map function that unfold
all ST monads in a list:
mapST
On Sat, Oct 25, 2008 at 11:55 PM, Paul L <[EMAIL PROTECTED]> wrote:
> Tnaks for the clarification, please see my further questions below
>
> On 10/25/08, Daniel Fischer <[EMAIL PROTECTED]> wrote:
>>
>> Sure, (g (flip readArray 0)) :: ST s Int, or, explicitly, forall s. ST s Int,
>> there's nothing
Tnaks for the clarification, please see my further questions below
On 10/25/08, Daniel Fischer <[EMAIL PROTECTED]> wrote:
>
> Sure, (g (flip readArray 0)) :: ST s Int, or, explicitly, forall s. ST s Int,
> there's nothing to restrict the s, so it's legitimate to pass it to runST.
..[snipped]..
> W
Am Sonntag, 26. Oktober 2008 02:18 schrieb Paul L:
> I'm have some trouble using the ST monad, and I think
> I'm confused about its use of existential type.
>
> > {-# OPTIONS -XRankNTypes #-}
> > import Control.Monad.ST
> > import Data.Array.ST
>
> I want to implement a map function that unfold
>
>
I'm have some trouble using the ST monad, and I think
I'm confused about its use of existential type.
> {-# OPTIONS -XRankNTypes #-}
> import Control.Monad.ST
> import Data.Array.ST
I want to implement a map function that unfold
all ST monads in a list:
> mapST :: (a -> (forall s . ST s b)) -> [