Andre W B Furtado wrote:
>Well, it's also possible to interchange data between these two monads by:
>
>unsafeIOToST :: IO a -> ST s a
>stToIO :: ST s a -> IO a
>
>Can anyone tell the possible problems related to
>unsafeIOToST?
Andre W B Furtado wrote:
>Well, it's also possible to interchange data between these two monads by:
>
>unsafeIOToST :: IO a -> ST s a
>stToIO :: ST s a -> IO a
>
>Can anyone tell the possible problems related to
>unsafeIOToST?
>^^
Probably in the same manner as with unsafePerformIO:
it can br
Tom Bevan wrote:
>
> Hi all,
>
> I'm writing a programme which requires IO actions to be interleaved with
> operations on a State monad. From what I can work out, this means that
> the IO Monad and the StateTransformation monad need to be composed into
> a single highr order monad.
> Does anyone
gt;
To: Andre W B Furtado <[EMAIL PROTECTED]>
Cc: Haskell Cafe List <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 4:13 AM
Subject: Re: Monad composition
> Andre,
>
> I can't work out how it should be done.
> The way I see it, the StateIO monad should have four f
The easiest way to combine State and IO is using a monad transformer. There
are some lecture notes which you might find useful at
http://www.md.chalmers.se/~rjmh/Combinators/Monads/index.htm
which refer to a library module
http://www.md.chalmers.se/~rjmh/Combinators/MonadTransfo
EMAIL PROTECTED]>
> Sent: Wednesday, January 23, 2002 4:29 AM
> Subject: Monad composition
>
>
> >
> > Hi all,
> >
> > I'm writing a programme which requires IO actions to be interleaved with
> > operations on a State monad. From what I can work