ST monad bug

Iavor S. Diatchki diatchki@cse.ogi.edu
Thu, 3 Jan 2002 11:03:03 -0800


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