Skip to content

Stg lint failure while building ghc-stage2: compiler/stage2/build/Hoopl/Block.o

With the tree at: https://github.com/duog/ghc/tree/trac-14536 Which fixes #14536 (closed) With build.mk:

BuildFlavour = validate

ifneq "$(BuildFlavour)" ""
include mk/flavours/$(BuildFlavour).mk
endif

GhcStage2HcOpts    +=  -dcore-lint -dstg-lint -dcmm-lint

building with:

make compiler/stage2/build/Hoopl/Block.o

I get the following Stg lint error (extracts, full dump attached):

  <no location info>: warning:
       [in body of lambda with binders ds_s4dH :: a_a3as -> b_a3at,
                                       ds1_s4dI :: MaybeO ex_a3ao a_a3as]
      In some algebraic case alternative, number of arguments doesn't match constructor:
      JustO (arity 2)
      [a1_s4dK]
  1. ..
  $fFunctorMaybeO_$cfmap
    :: forall ex a b. (a -> b) -> MaybeO ex a -> MaybeO ex b
  [GblId,
   Arity=2,
   Caf=NoCafRefs,
   Str=<L,1*C1(U)><S,1*U>,
   Unf=OtherCon []] =
      [] \r [ds_s4dH ds1_s4dI]
          case ds1_s4dI of {
            JustO a1_s4dK [Occ=Once] ->
                let {
                  sat_s4dL [Occ=Once] :: b_a3at
                  [LclId] =
                      [ds_s4dH a1_s4dK] \u [] ds_s4dH a1_s4dK;
                } in  JustO [sat_s4dL];
            NothingO -> $WNothingO;
          };
Edited by Douglas Wilson
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information