<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 8, 2017 at 9:18 AM, Neil Mayhew <span dir="ltr"><<a href="mailto:neil_mayhew@users.sourceforge.net" target="_blank">neil_mayhew@users.sourceforge.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div class="m_7498690979367326822markdown-here-wrapper" style="font-family:Ubuntu,Cantarell,Deja Vu Sans,sans-serif;font-size:10pt">
<p style="margin:0px 0px 1.2em!important"><span style="font-size:10pt">Good point. Having
great optimization isn’t a justification for complete mental
laziness on the part of the programmer! However, I did find the
behaviour in this case surprising and unintuitive, given ghc’s
usual ability to optimize things, and having it change on me
when I enabled profiling left me wondering where to go next. The
code I presented here is considerably simplified from the
original program, and represents a lot of work already expended
trying to get to the root of the problem.</span></p></div></div></blockquote></div>This is actually why I (and likely SPJ) am inclined to consider it a bug; while it might be arguable as Sven does, the counterintuitive effect when you turn on profiling suggests that it's not intended or expected. (Although maybe it should be; the intuition is "profiling disables optimization" but what it really does is a bit more subtle than that overly simplistic notion.)<br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>