From: sof Date: Mon, 24 Nov 1997 20:37:25 +0000 (+0000) Subject: [project @ 1997-11-24 20:37:25 by sof] X-Git-Tag: Approx_2487_patches~1265 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=87bb85a3d19742d1cae8b680d17b2e19b203ec44;p=ghc-hetmet.git [project @ 1997-11-24 20:37:25 by sof] Added compatibility stubs for ST and PrimIO operators --- diff --git a/ghc/lib/glaExts/GlaExts.lhs b/ghc/lib/glaExts/GlaExts.lhs index 84342a0..98d48bd 100644 --- a/ghc/lib/glaExts/GlaExts.lhs +++ b/ghc/lib/glaExts/GlaExts.lhs @@ -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}