[project @ 2003-06-19 10:42:24 by simonmar]
[ghc-hetmet.git] / ghc / compiler / prelude / primops.txt.pp
index 8cde1b8..37c6c6f 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------
--- $Id: primops.txt.pp,v 1.26 2003/03/24 14:46:53 simonmar Exp $
+-- $Id: primops.txt.pp,v 1.27 2003/06/19 10:42:26 simonmar Exp $
 --
 -- Primitive Operations
 --
@@ -1312,6 +1312,15 @@ primop  RaiseOp "raise#" GenPrimOp
    usage       = { mangle RaiseOp [mkM] mkM }
    out_of_line = True
 
+-- raiseIO# needs to be a primop, because exceptions in the IO monad
+-- must be *precise* - we don't want the strictness analyser turning
+-- one kind of bottom into another, as it is allowed to do in pure code.
+
+primop  RaiseIOOp "raiseIO#" GenPrimOp
+   a -> State# RealWorld -> (# State# RealWorld, b #)
+   with
+   out_of_line = True
+
 primop  BlockAsyncExceptionsOp "blockAsyncExceptions#" GenPrimOp
         (State# RealWorld -> (# State# RealWorld, a #))
      -> (State# RealWorld -> (# State# RealWorld, a #))