[Haskell-cafe] About 'Overloaded functions are not your friend' line in GHC manual

Brandon Allbery allbery.b at gmail.com
Fri Jan 11 18:13:54 UTC 2019

Only up to a point. Recursive uses — such as show, which delegates to other
Show instances for record fields, etc. — are problematic.

On Fri, Jan 11, 2019 at 1:04 PM Johannes Waldmann <
johannes.waldmann at htwk-leipzig.de> wrote:

> At run-time, only the branch (Left/Right) is "picked" at run-time.
> For each branch, the "show" instance is determined at compile-time.
> The problem is that such instances are represented by dictionaries,
> and this adds extra cost (extra arguments) to function calls -
> but only in those cases where these dictionaries
> are not inlined (that is, removed) statically.
> But I am thinking that GHC has become very good at inlining.
> - J.W.
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.

brandon s allbery kf8nh
allbery.b at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190111/4f3c7811/attachment.html>

More information about the Haskell-Cafe mailing list