diff options
author | Sebastian Graf <sgraf1337@gmail.com> | 2019-09-27 09:38:47 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-28 17:12:26 -0400 |
commit | ce64b397777408731c6dd3f5c55ea8415f9f565b (patch) | |
tree | a0a0b3a88145a913f4f6972ee679460fc5c0267e /INSTALL.md | |
parent | c5d888d41eb7b39ea0d4c4aabd07ce8133bfeae6 (diff) | |
download | haskell-ce64b397777408731c6dd3f5c55ea8415f9f565b.tar.gz |
`exprOkForSpeculation` for Note [IO hack in the demand analyser]
In #14998 I realised that the notion of speculative execution
*exactly matches* eager evaluation of expressions in a case alternative
where the scrutinee is an IO action.
Normally we have to `deferIO` any result from that single case
alternative to prevent this speculative execution, so we had a special
case in place in the demand analyser that would check if the scrutinee
was a prim-op, in which case we assumed that it would be ok to do the
eager evaluation.
Now we just check if the scrutinee is `exprOkForSpeculation`,
corresponding to the notion that we want to push evaluation of the
scrutinee *after* eagerly evaluating stuff from the case alternative.
This fixes #14988, because it resolves the last open Item 4 there.
Diffstat (limited to 'INSTALL.md')
0 files changed, 0 insertions, 0 deletions