Skip to content

Core lint error when compiling hindent-6.0.0 with GHC 9.4

This reproduces as far back as GHC 9.4.3 at least.

I was unable to quickly test other GHC versions because hindent-6.0.0 only builds with GHC 9.4

[27 of 34] Compiling HIndent.ModulePreprocessing.CommentRelocation ( src/HIndent/ModulePreprocessing/CommentRelocation.hs, dist/build/HIndent/ModulePreprocessing/CommentRelocation.o, dist/build/HIndent/ModulePreprocessing/CommentRelocation.dyn_o )
WARNING:
  Simplifier bailing out
  HIndent.ModulePreprocessing.CommentRelocation, after 4 iterations [2935, 256, 147, 18]
    Size = {terms: 2,032, types: 4,376, coercions: 1,971, joins: 2/66}
  Call stack:
      CallStack (from HasCallStack):
        warnPprTrace, called at compiler/GHC/Core/Opt/Pipeline.hs:700:9 in ghc:GHC.Core.Opt.Pipeline
WARNING:
  Missed specialisation opportunity
  return
  [m_aiez, v_B1] [~]
  Call stack:
      CallStack (from HasCallStack):
        warnPprTrace, called at compiler/GHC/Core/Opt/Specialise.hs:1464:5 in ghc:GHC.Core.Opt.Specialise
*** Core Lint errors : in result of CorePrep ***
<no location info>: warning:
    The coercion variable co1_a121C
                            :: (f2_a11D3 :~~: EpAnn) ~# (Any :~~: Any)
                          [LclId[CoVarId]]
      is out of scope
    In the RHS of $wgo1_r15Om :: forall {a1}.
                                 Typeable a1 =>
                                 (forall (m :: * -> *).
                                  Monad m =>
                                  (forall d. Data d => d -> m d) -> a1 -> m a1)
                                 -> a1 -> StateT [LEpaComment] Identity a1
    In the body of lambda with binder a1_s15CI :: *
    In the body of lambda with binder ww_s15Zl :: Typeable a1_s15CI
    In the body of lambda with binder ww1_s15Zm :: forall (m :: *
                                                                -> *).
                                                   Monad m =>
                                                   (forall d. Data d => d -> m d)
                                                   -> a1_s15CI -> m a1_s15CI
    In the body of lambda with binder x_s15Zn :: a1_s15CI
    In the body of letrec with binders lvl24_s15Zo :: AppOrCon a1_s15CI
    In the body of letrec with binders m1_s15Zp :: StateT
                                                     [LEpaComment] Identity a1_s15CI
    In the body of lambda with binder s1_s15Zq :: [LEpaComment]
    In the body of letrec with binders ds_s15Zr :: Identity
                                                     (a1_s15CI, [LEpaComment])
    In a case alternative: (IsApp k'_a11D2 :: *,
                                  f2_a11D3 :: k'_a11D2 -> *,
                                  x1_a11D4 :: k'_a11D2,
                                  co_a11D5 :: a1_s15CI ~# f2_a11D3 x1_a11D4,
                                  f3_s15Zt :: TypeRep f2_a11D3,
                                  x2_s15Zu :: TypeRep x1_a11D4)
    In a case alternative: (True)
    In a case alternative: ((,) a2_s15ZF :: a1_s15CI,
                                s'_s15ZG :: [LEpaComment])
    In a case alternative: (EpAnn ds1_s15ZI :: Anchor,
                                  ds2_s15ZJ :: (x1_a11D4 |> Sym (Nth:3
                                                                     (Kind
                                                                          (Sym (Nth:3
                                                                                    (Sub (Sym Univ(nominal CorePrep
                                                                                                   :: f2_a11D3
                                                                                                      :~~: EpAnn, Any
                                                                                                                  :~~: Any))))
                                                                           ; Nth:2
                                                                                 (Sub (Sym Univ(nominal CorePrep
                                                                                                :: f2_a11D3
                                                                                                   :~~: EpAnn, Any
                                                                                                               :~~: Any))))))),
                                  ds3_s15ZK :: EpAnnComments)
    In a case alternative: (Anchor ds4_s15ZM :: RealSrcSpan,
                                   ds5_s15ZN :: AnchorOperation)
    In the body of letrec with binders ds6_s15ZO :: ([LEpaComment],
                                                     [LEpaComment])
    In the body of letrec with binders sat_s162b :: [LEpaComment]
    In the result-type of a case with scrutinee: ds3_s15ZK
    In the type ‘EpAnn
                   (x1_a11D4 |> Sym (Nth:3
                                         (Kind
                                              (Sym (Nth:3 (Sub (Sym co1_a121C)))
                                               ; Nth:2 (Sub (Sym co1_a121C))))))’
    Substitution: [TCvSubst
                     In scope: InScope {k'_a11D2 f2_a11D3 x1_a11D4 co_a11D5 a1_s15CI}
                     Type env: [a11D2 :-> k'_a11D2, a11D3 :-> f2_a11D3,
                                a11D4 :-> x1_a11D4, s15CI :-> a1_s15CI]
                     Co env: [a11D5 :-> co_a11D5]]
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information