diff --git a/ghc/docs/libraries/IOExts.sgml b/ghc/docs/libraries/IOExts.sgml index b2d1ddd97c755ccc92d8035110165790b9451897..2af078938f03f936ab3457bb7503e2e1af78c0d8 100644 --- a/ghc/docs/libraries/IOExts.sgml +++ b/ghc/docs/libraries/IOExts.sgml @@ -58,12 +58,6 @@ 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> @@ -98,7 +92,5 @@ performGC :: IO () trace :: String -> a -> a unsafePtrEq :: a -> a -> Bool -unsafeIOToST :: IO a -> ST s a -stToIO :: ST s a -> IO a </verb></tscreen> diff --git a/ghc/docs/libraries/ST.sgml b/ghc/docs/libraries/ST.sgml index 1fdd7603d5c7057cbf99d3a1f72d451f2fad9f59..3be2067d4770b9398fb1258d00dcd5f46584b43f 100644 --- a/ghc/docs/libraries/ST.sgml +++ b/ghc/docs/libraries/ST.sgml @@ -37,6 +37,9 @@ thawSTArray :: Ix ix => Array ix elt -> ST s (STArray s ix elt) freezeSTArray :: Ix ix => STArray s ix elt -> ST s (Array ix elt) unsafeFreezeSTArray :: Ix ix => STArray s ix elt -> ST s (Array ix elt) instance Eq (STArray s ix elt) + +unsafeIOToST :: IO a -> ST s a +stToIO :: ST s a -> IO a </verb></tscreen> Notes: @@ -53,12 +56,6 @@ operation <tt/unsafeFreezeSTArray/ is a faster version of <tt/freezeSTArray/ which omits the copying step. It's a safe substitute for <tt/freezeSTArray/ if you don't modify the mutable array after freezing it. -<item> -In the current version of Hugs, the <tt/<idx/runST// operation, -used to specify encapsulation, is implemented as a language construct, -and <tt/runST/ is treated as a keyword. We plan to change this to match -GHC soon. - <!-- <item> Note that it is possible to install Hugs 1.4 without support for lazy @@ -76,4 +73,10 @@ places where it matters. GHC implements LazyST and ST using different types, so this isn't possible. </item> +<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>