Warning about glomming

Simon Peyton Jones simon.peytonjones at gmail.com
Thu Apr 7 08:12:13 UTC 2022

It's a warning directed solely at compiler authors (hence -DDEBUG).  If a
lot of glomming is happening, it might be due to some scoping or dependency
analysis bug -- e.g. perhaps OccAnal isn't putting bindings in proper
dependency order, or perhaps some plugin is gratuitously scrambling the
order of the top level definitions.   Or it might be legitimate, as in your

Perhaps adding a Note with the code that generates the warning (or wherever
you looked -- where was that?) would be better.  I always like to look for
ways to reply not just to Gergo but to all the future Gergos who stumble
over this.

Gergo might you offer a patch?


On Thu, 7 Apr 2022 at 07:47, Gergő Érdi <gergo at erdi.hu> wrote:

> Using -DDEBUG, I see a warning about glomming from OccurAnal. Having
> read the relevant Note, the situation is exactly what's described
> here: since I'm using cross-module specializations, the specializer
> will generate rewrite rules that replace external references with
> local forward references.
> But the one thing the Note doesn't explicitly state is why this is
> reported as a warning. It sounds like OccurAnal is well equipped to
> fix this problem. So is glomming a sign of a problem or is it not? If
> I see that warning, does that point to a problem in how I use the GHC
> API, a problem in the code that I'm trying to compile, or neither?
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20220407/bf79070b/attachment.html>

More information about the ghc-devs mailing list