ST monad bug

Sigbjorn Finne sof@galois.com
Fri, 4 Jan 2002 03:09:38 -0800


Thanks, a bug allright. This has been fixed in the current sources &
I believe the fix has been passed along to you via Mr MDo himself,
Levent Erkok. If not, let me know.

--sigbjorn

----- Original Message -----
From: "Iavor S. Diatchki" <diatchki@cse.ogi.edu>
To: <hugs-bugs@haskell.org>
Sent: Thursday, January 03, 2002 11:03
Subject: ST monad bug


> hi
>
> i run into a bug in the implementation if the ST monad:
>
> f = fixST $ const $ return 'z' >>= return
>
> Main> runST f
> '\
> Program error: Prelude.!!: negative index
>
>
> it looks like there is a bug with the pointers and the wrong type of thing
> gets written somewhere.
>
> here is another example:
> f = fixST $ const $ return 'z' >>= return . ord
>
> Main> runST f
> ('z',)
>
>
> bye
> iavor
>
> _______________________________________________
> Hugs-Bugs mailing list
> Hugs-Bugs@haskell.org
> http://www.haskell.org/mailman/listinfo/hugs-bugs