[project @ 1999-01-16 16:00:03 by sof]
authorsof <unknown>
Sat, 16 Jan 1999 16:00:03 +0000 (16:00 +0000)
committersof <unknown>
Sat, 16 Jan 1999 16:00:03 +0000 (16:00 +0000)
Documented IO <--> ST coercion operators

ghc/docs/libraries/IOExts.sgml

index 4680807..faa0a23 100644 (file)
@@ -56,7 +56,12 @@ simplified memoisation function:
 >               return a
 </verb></tscreen>
 
-
+<item>
+Operations for coercing an <tt/ST/ action into an <tt/IO/ one, and
+vice versa are also provided. Notice that coercing an <tt/IO action
+into an <tt/ST/ action is 'lossy', since any exception raised within the
+<tt/IO/ action will not be caught within the <tt/ST/ monad, as it
+doesn't support (monadic) exceptions.
 </itemize>
 
 <tscreen><verb>
@@ -90,5 +95,8 @@ instance Show IOModeEx
 performGC           :: IO ()
 trace               :: String -> a -> a
 unsafePtrEq         :: a -> a -> Bool
+
+unsafeIOToST       :: IO   a -> ST s a
+stToIO              :: ST s a -> IO a
 </verb></tscreen>