<div dir="auto">Well, not always. They have special support in the RTS that seems worth experimenting with. setjmp/longjmp is what I'm after.</div><div class="gmail_extra"><br><div class="gmail_quote">On Feb 21, 2018 11:24 PM, "Branimir Maksimovic" <<a href="mailto:branimir.maksimovic@gmail.com">branimir.maksimovic@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hm, isn't that exceptions are exceptional?<br>
<br>
<br>
On <a href="tel:22.02.2018.%2005" value="+12202201805" target="_blank">22.02.2018. 05</a>:21, David Feuer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Because sometimes the sanctioned way is inefficient. throwIO always<br>
wraps its exception argument in a SomeException constructor before<br>
calling raiseIO# on the result. That extra baggage is likely enough to<br>
make the implementation I'm considering too slow to bother with, so I<br>
care right now in 2018. I'd very much prefer to get an<br>
officially-approved way to do what I want, but barring that I'll take<br>
one that works.<br>
<br>
On Wed, Feb 21, 2018 at 9:33 AM, Doug McIlroy <<a href="mailto:doug@cs.dartmouth.edu" target="_blank">doug@cs.dartmouth.edu</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can I use reallyUnsafePtrEquality# reliably to identify whether a value is<br>
</blockquote>
a nullary constructor of a particular type?<br>
</blockquote>
Can this "optimization" possibly save enough time to justify<br>
nonstandard trickery?<br>
This kind of obscure brittle coding may have been OK 50 years<br>
ago. But why do it now?<br>
<br>
Doug<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
Only members subscribed via the mailman list are allowed to post.<br>
</blockquote>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
Only members subscribed via the mailman list are allowed to post.<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>