From 42fe164955f3c326604e284505b271c6035d0245 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 27 Oct 2010 18:41:28 +0000 Subject: [PATCH] Add strictness for raiseIO# primop --- compiler/prelude/primops.txt.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp index cb7c792..c5dad9b 100644 --- a/compiler/prelude/primops.txt.pp +++ b/compiler/prelude/primops.txt.pp @@ -1140,10 +1140,14 @@ primop RaiseOp "raise#" GenPrimOp -- 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. +-- +-- But we *do* want to know that it returns bottom after +-- being applied to two arguments primop RaiseIOOp "raiseIO#" GenPrimOp a -> State# RealWorld -> (# State# RealWorld, b #) with + strictness = { \ _arity -> mkStrictSig (mkTopDmdType [lazyDmd,lazyDmd] BotRes) } out_of_line = True has_side_effects = True -- 1.7.10.4