
23 Apr
2010
23 Apr
'10
2:54 a.m.
Simon, On 23/04/2010, at 16:49, Simon Peyton-Jones wrote:
| foo v x = ... case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) -> | case touch# fp s# of { _ -> foo v (Just (I# n# }})) ...
I'll implement that fix. It should catch cases like this where the primops involves are - ok-for-speculation - have just one result (ie only one case alternative
I don't think touch# is ok-for-speculation. primop TouchOp "touch#" GenPrimOp o -> State# RealWorld -> State# RealWorld with has_side_effects = True Note the has_side_effects part. In fact, wouldn't it be eliminated altogether in this case if it was ok-for-speculation? Roman