Skip to content

"Arity decrease" warnings when compiling Haddock

I'm getting warnings of the form

WARNING: file compiler/GHC/Core/Op/Simplify/Utils.hs, line 1528
  Arity decrease: lvl_s4yB 3 0 0
  lvl_s4XI
  `cast` (Sym (N:Builder[0])
          :: (forall r. BuildStep r -> BuildStep r) ~R# Builder)
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1289:29 in ghc:Outputable
        warnPprTrace, called at compiler/GHC/Core/Op/Simplify/Utils.hs:1526:11 in ghc:GHC.Core.Op.Simplify.Utils

Having looked at prepareRhs lately, I suspect it has to do that we don't transfer lvl_s4yB's arityInfo on to lvl_s4XI's sanitised_info in the makeTrivialWithInfo case.

As I said in #17673 (comment 267431), we probably want to share the logic with WW, which doesn't have this weakness.

Edited by Sebastian Graf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information