
We should have this conversation on a ticket, perhaps #13027.
| good at the time). Are there actually any primops with lifted arguments
| where we *want* speculation? Perhaps the most important primop to
| consider is seq#, which is
I don't understand this question. comment:23 of #13027 specifically says to skip the ok-for-spec test for lifted args. So you as "are the any" whereas comment:23 says "all".
| 2. If dataToTag# is marked can_fail (an aspect of https://
| phabricator.haskell.org/rGHC5a9a1738023a), is it still possible for it to
| end up being applied to an unevaluated argument? If not, perhaps the
| CorePrep specials can be removed altogether.
That may be true, but it's not easy to GUARANTEE in the way that Lint guarantees types. So I'm happier leaving in the CorePrep stuff.. but please do add a comment there that points to the Note in primops.txt.pp and says that it seems unlikely this will ever occur.
| One more question: do you think it's *better* to let dataToTag# float and
| then fix it up later, or better to mark it can_fail? Unlike
| reallyUnsafePtrEquality#, dataToTag# is used all over the place, so it is
| important that it interacts as well as possible with the optimizer,
| whatever that entails.
I think better to do as now. That way the simplifier has the opportunity to common-up multiple evals into one. If we add them later that's harder.
By all means add Notes to explain this.
Thanks!
Simon
| -----Original Message-----
| From: David Feuer [mailto:david@well-typed.com]
| Sent: 18 January 2017 19:45
| To: Simon Peyton Jones