Skip to content

Demand analyser is unpacking too deeply

The demand analyser reports that fixpoint iterations are sometimes going on forever; in particular, this debug trace trips:

| +      = -- pprTrace "dmdFix loop" (ppr n <+> (vcat
| +        --                 [ text "Sigs:" <+> ppr [ (id,lookupVarEnv
| (sigEnv env) id,
| +        --                                              lookupVarEnv
| (sigEnv env') id)
| +        --                                          | (id,_) <- pairs],
| +        --                   text "env:" <+> ppr env,
| +        --                   text "binds:" <+> pprCoreBinding (Rec

This happens during bootsrapping GHC itself, and maybe somewhere in the testsuite; I forget.

The reason is that I thought a neater way to control unpacking of recursive products would work (see the ae_rec_tc field of AnalEnv) but I was wrong.

This doesn't bite often but it's plainly wrong and needs fixing.

Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information