[Haskell-cafe] Unused type-classes triggering a recompilation?
Saurabh Nanda
saurabhnanda at gmail.com
Wed Oct 18 17:43:22 UTC 2017
>
> Because it is part of the external interface for dependencies of those
> modules and therefore triggers both an API change (which here has no
> effect) and an ABI change because internals of a module can leak out via
> .hi file exposure for cross-module inlining. There is no way to guard
> against that last, and avoiding it would usually be even more expensive
> than just treating the entire .hi as a dependency that changed (the
> dependency graph would *explode* if you had to track dependencies per
> possible inlining).
>
> And no, you do not want to defeat inlining, *especially* with lens.
> Performance will utterly tank.
>
I probably have not understood what you're saying. In LensClasses.hs if I
simply add a new HasAddress class without defining an instance anywhere in
the app, it triggers a re-compile. Is this changing the API / ABI in any
way?
-- Saurabh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20171018/560436e4/attachment.html>
More information about the Haskell-Cafe
mailing list