<div dir="ltr"><p dir="ltr">I'm not awake yet. That paper is not what you asked at all. </p><p>I'm not aware of any paper that presents a type system statically ruling</p><p>out thunks of unbounded depth, but it seems to me like this indeed should be possible.</p><p><br></p>
<div class="gmail_quote">On Feb 18, 2015 7:24 AM, "Atze van der Ploeg" <<a href="mailto:atzeus@gmail.com" target="_blank">atzeus@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"><p dir="ltr">See the paper "copatterns" by andreas abel.</p>
<p dir="ltr">Cheers!</p>
<p dir="ltr">Atze</p>
<div class="gmail_quote">On Feb 18, 2015 6:04 AM, "Eugene Kirpichov" <<a href="mailto:ekirpichov@gmail.com" target="_blank">ekirpichov@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"><div dir="ltr"><div>Hello haskell-cafe,</div><div><br></div><div>Let me repost here a question I posted to cstheory stackexchange - in hopes that there are more type theory experts here.</div><div><br></div><a href="http://cstheory.stackexchange.com/questions/29518/type-systems-preventing-laziness-related-memory-leaks" target="_blank">http://cstheory.stackexchange.com/questions/29518/type-systems-preventing-laziness-related-memory-leaks</a><br><div><br></div><div><div>Perhaps the main source of performance problems in Haskell is when a program inadvertently builds up a thunk of unbounded depth - this causes both a memory leak and a potential stack overflow when evaluating. The classic example is defining sum = foldr (+) 0 in Haskell.</div><div><br></div><div>Are there any type systems which statically enforce lack of such thunks in a program using a lazy language?</div><div><br></div><div>Seems like this should be on the same order of difficulty as proving other static program properties using type system extensions, e.g. some flavors of thread safety or memory safety.</div><div><br></div></div></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div>
</blockquote></div>
</div>