<div dir="auto">Surely then the call stack is only foldr1, and not foldr1's callsite?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 16 Jun 2019, 8:27 pm Henning Thielemann, <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Sun, 16 Jun 2019, Simon Jakobi wrote:<br>
<br>
> >  I think only the partial implementations should get that constraint.<br>
<br>
> Oops, I had the misconception that one couldn't add a HasCallStack <br>
> constraint to method implementations.<br>
<br>
I think you have to declare:<br>
<br>
instance Foldable [] where<br>
    foldl1 = foldl1List<br>
<br>
foldl1List :: HasCallStack => (a->a->a) -> [a] -> a<br>
foldl1List = ...<br>
<br>
Would this work?_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>