<div dir="ltr"><div>Hi All</div><div><br></div>My apologies if this is the wrong place to post questions about GHC internals from a non-GHC dev, I thought about using GHC Users but it seems quiet on that mailing list and I think my question relates closely to how GHC implements things, so I suspect only a dev could answer anyway.<div><br></div><div>I have posted the following StackOverflow question: <a href="https://stackoverflow.com/questions/74540639/when-are-the-results-of-default-methods-in-instances-cached">https://stackoverflow.com/questions/74540639/when-are-the-results-of-default-methods-in-instances-cached</a></div><div><br></div><div>I won't repeat the full contents here, but basically my question is that if I have a class with a "method" which has a default definition, and that default definition has no arguments on the LHS, will a separate "instance" of that default definition be created for each instance of that class that inherits that default definition? The important consequence of that being that the default definition is only computed once per type. </div><div><br></div><div>Or is the default definition treated as a definition generalised over a typeclass, and hence having a hidden typeclass variable and therefore treated as a function, so it needs to be recomputed every time it's referenced?</div><div><br></div><div>Any feedback or references will be appreciated.</div><div><br></div><div>Thanks,</div><div>Clinton</div></div>