<div dir="ltr">On Wed, Dec 28, 2016 at 3:21 PM, Olaf Klinke <span dir="ltr"><<a href="mailto:olf@aatal-apotheke.de" target="_blank">olf@aatal-apotheke.de</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> Am 28.12.2016 um 19:40 schrieb Jan-Willem Maessen <<a href="mailto:jmaessen@alum.mit.edu">jmaessen@alum.mit.edu</a>>:<br>
><br>
> A caution on this alternative: the first component of the tuple won't be strict enough and you'll leak space. I think the proposed solution is better. Note that you *don't* necessarily need the strictness annotation on healthTopics – this shifts around when the list append gets run but won't change space much.<br>
><br>
> -Jan-Willem Maessen<br>
</span>Thanks for clarifying this, Jan-Willem. So there ought to be stricter versions of the newtype wrappers in Data.Monoid. Even then, the tuple is not strict. Will that also leak space?<br></blockquote><div><br></div><div>Yes, the fact that the tuple is strict means that Sum's strictness doesn't matter (and Sum is a newtype, so strictness doesn't really come into play).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I just thought the (Sum Int,[String]) type was a neat example of instance deriving.<br></blockquote><div><br></div><div>Indeed! And if I were hacking up a one-shot script I'd probably do it that way.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Olaf</blockquote></div><br></div></div>