type of stToIO
Simon Peyton-Jones
simonpj at microsoft.com
Thu Oct 5 12:25:18 EDT 2000
Ross
| The library documentation says
|
| stToIO :: ST s a -> IO a
|
| but PrelIOBase says
|
| stToIO :: ST RealWorld a -> IO a
|
| The documented type would be unsafe (as it is in Classic Hugs), so it
| seems necessary to mention the real world in the documentation.
I discussed this with John Launchbury who pointed out a much
better type for stToIO
stToIO :: (forall s. ST s a) -> IO a
That avoids exposing RealWorld while preserving soundness. Better, eh?
I'm going to implement this in hslibs/ and document the reason in the
library documentation.
Simon
More information about the Glasgow-haskell-bugs
mailing list