projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
51367fb
)
Add strictness for raiseIO# primop
author
simonpj@microsoft.com
<unknown>
Wed, 27 Oct 2010 18:41:28 +0000
(18:41 +0000)
committer
simonpj@microsoft.com
<unknown>
Wed, 27 Oct 2010 18:41:28 +0000
(18:41 +0000)
compiler/prelude/primops.txt.pp
patch
|
blob
|
history
diff --git
a/compiler/prelude/primops.txt.pp
b/compiler/prelude/primops.txt.pp
index
cb7c792
..
c5dad9b
100644
(file)
--- 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.
-- 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
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
out_of_line = True
has_side_effects = True