[project @ 1997-11-24 20:37:25 by sof]
authorsof <unknown>
Mon, 24 Nov 1997 20:37:25 +0000 (20:37 +0000)
committersof <unknown>
Mon, 24 Nov 1997 20:37:25 +0000 (20:37 +0000)
Added compatibility stubs for ST and PrimIO operators

ghc/lib/glaExts/GlaExts.lhs

index 84342a0..98d48bd 100644 (file)
@@ -36,6 +36,10 @@ module GlaExts
        ioToPrimIO,
        primIOToIO,
        unsafePerformPrimIO,
+       thenPrimIO, thenIO_Prim,
+       seqPrimIO, returnPrimIO,
+
+       seqST, thenST, returnST,
 
         -- Everything from module ByteArray:
        module ByteArray,
@@ -69,5 +73,25 @@ type PrimIO a = IO a
 primIOToIO io = io
 ioToPrimIO io = io
 unsafePerformPrimIO = unsafePerformIO
+thenPrimIO :: PrimIO a -> (a -> PrimIO b) -> PrimIO b
+thenPrimIO = (>>=)
+
+seqPrimIO :: PrimIO a -> PrimIO b -> PrimIO b
+seqPrimIO = (>>)
+
+returnPrimIO :: a -> PrimIO a
+returnPrimIO = return
+
+thenIO_Prim :: PrimIO a -> (a -> IO b) -> IO b
+thenIO_Prim = (>>=)
+
+-- ST compatibility stubs.
+thenST :: ST s a -> ( a -> ST s b) -> ST s b
+thenST = (>>=)
+
+seqST :: ST s a -> ST s b -> ST s b
+seqST = (>>)
 
+returnST :: a -> ST s a
+returnST = return
 \end{code}