large-hashable icon indicating copy to clipboard operation
large-hashable copied to clipboard

Test suite fails on master in Data.LargeHashable.Tests.Inspection:genericSumGetsOptimized

Open sternenseemann opened this issue 3 years ago • 0 comments

$ stack test
…
[TEST] Data.LargeHashable.Tests.Inspection:genericSumGetsOptimized (test/Data/LargeHashable/Tests/Inspection.hs:40)
assertFailure test/Data/LargeHashable/Tests/Inspection.hs:41:11: genericUpdateHashSum mentions none of GHC.Generics.V1, GHC.Generics.U1, GHC.Generics.M1, GHC.Generics.K1, GHC.Generics.:+:, GHC.Generics.:*:, GHC.Generics.:.:, GHC.Generics.Rec1, GHC.Generics.Par1 failed:
genericUpdateHashSum :: SumTest -> LH ()
[LclIdX,
 Arity=1,
 Str=<S,1*U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [220] 512 240}]
genericUpdateHashSum
  = \ (eta [Dmd=<S,1*U>] :: SumTest) ->
      case eta of {
        A g1 ->
          ($j_s1GzQ
             (L1
                @(*)
                @(M1
                    C
                    ('MetaCons "A" 'PrefixI 'False)
                    (M1
                       S
                       ('MetaSel
                          'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                       (K1 R Int)))
                @(M1
                    C
                    ('MetaCons "B" 'PrefixI 'False)
                    (M1
                       S
                       ('MetaSel
                          'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                       (K1 R Char)))
                @Any
                (g1
                 `cast` (Sym (N:K1[0] <*>_N <R>_P <Int>_R <Any>_P) ; (Sym (N:M1[0]
                                                                               <*>_N
                                                                               <S>_P
                                                                               <'MetaSel
                                                                                  'Nothing
                                                                                  'NoSourceUnpackedness
                                                                                  'NoSourceStrictness
                                                                                  'DecidedLazy>_P
                                                                               <K1
                                                                                  R
                                                                                  Int>_R) ; Sym (N:M1[0]
                                                                                                     <*>_N
                                                                                                     <C>_P
                                                                                                     <'MetaCons
                                                                                                        "A"
                                                                                                        'PrefixI
                                                                                                        'False>_P
                                                                                                     <M1
                                                                                                        S
                                                                                                        ('MetaSel
                                                                                                           'Nothing
                                                                                                           'NoSourceUnpackedness
                                                                                                           'NoSourceStrictness
                                                                                                           'DecidedLazy)
                                                                                                        (K1
                                                                                                           R
                                                                                                           Int)>_R)) <Any>_N
                         :: Coercible
                              Int
                              (M1
                                 C
                                 ('MetaCons "A" 'PrefixI 'False)
                                 (M1
                                    S
                                    ('MetaSel
                                       'Nothing
                                       'NoSourceUnpackedness
                                       'NoSourceStrictness
                                       'DecidedLazy)
                                    (K1 R Int))
                                 Any)))))
          `cast` ((<LHEnv>_R
                   %<'Many>_N ->_R Sym (N:IO[0] <()>_R)) ; Sym (N:LH[0] <()>_R)
                  :: Coercible
                       (LHEnv -> State# RealWorld -> (# State# RealWorld, () #)) (LH ()));
        B g1 ->
          ($j_s1GzQ
             (R1
                @(*)
                @(M1
                    C
                    ('MetaCons "A" 'PrefixI 'False)
                    (M1
                       S
                       ('MetaSel
                          'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                       (K1 R Int)))
                @(M1
                    C
                    ('MetaCons "B" 'PrefixI 'False)
                    (M1
                       S
                       ('MetaSel
                          'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                       (K1 R Char)))
                @Any
                (g1
                 `cast` (Sym (N:K1[0] <*>_N <R>_P <Char>_R <Any>_P) ; (Sym (N:M1[0]
                                                                                <*>_N
                                                                                <S>_P
                                                                                <'MetaSel
                                                                                   'Nothing
                                                                                   'NoSourceUnpackedness
                                                                                   'NoSourceStrictness
                                                                                   'DecidedLazy>_P
                                                                                <K1
                                                                                   R
                                                                                   Char>_R) ; Sym (N:M1[0]
                                                                                                       <*>_N
                                                                                                       <C>_P
                                                                                                       <'MetaCons
                                                                                                          "B"
                                                                                                          'PrefixI
                                                                                                          'False>_P
                                                                                                       <M1
                                                                                                          S
                                                                                                          ('MetaSel
                                                                                                             'Nothing
                                                                                                             'NoSourceUnpackedness
                                                                                                             'NoSourceStrictness
                                                                                                             'DecidedLazy)
                                                                                                          (K1
                                                                                                             R
                                                                                                             Char)>_R)) <Any>_N
                         :: Coercible
                              Char
                              (M1
                                 C
                                 ('MetaCons "B" 'PrefixI 'False)
                                 (M1
                                    S
                                    ('MetaSel
                                       'Nothing
                                       'NoSourceUnpackedness
                                       'NoSourceStrictness
                                       'DecidedLazy)
                                    (K1 R Char))
                                 Any)))))
          `cast` ((<LHEnv>_R
                   %<'Many>_N ->_R Sym (N:IO[0] <()>_R)) ; Sym (N:LH[0] <()>_R)
                  :: Coercible
                       (LHEnv -> State# RealWorld -> (# State# RealWorld, () #)) (LH ()));
        C g1 ->
          let {
            ds1 [Dmd=<L,C(C1(U))>] :: LH ()
            [LclId,
             Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
                     WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 20 0}]
            ds1 = updateHashInteger g1 } in
          (\ (env [Dmd=<L,U(U(U,U,U,U,U),U)>] :: LHEnv)
             (s :: State# RealWorld) ->
             case env of wild1
             { LHEnv ds2 [Dmd=<S(LLLLC(C(S))),U(U,U,U,U,U)>] ds3 ->
             case ds2 of
             { HashUpdates ds4 [Dmd=<L,A>] ds5 [Dmd=<L,A>] ds6 [Dmd=<L,A>]
                           ds7 [Dmd=<L,A>] ds8 [Dmd=<C(C(S)),1*C1(C1(U(U,A)))>] ->
             case ((ds8 x_s1Fkm)
                   `cast` (N:IO[0] <()>_R
                           :: Coercible
                                (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                    s
             of
             { (# ipv1, ipv2 [Dmd=<L,A>] #) ->
             (((ds1
                `cast` (N:LH[0] <()>_R :: Coercible (LH ()) (LHEnv -> IO ())))
                 wild1)
              `cast` (N:IO[0] <()>_R
                      :: Coercible
                           (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
               ipv1
             }
             }
             })
          `cast` ((<LHEnv>_R
                   %<'Many>_N ->_R Sym (N:IO[0] <()>_R)) ; Sym (N:LH[0] <()>_R)
                  :: Coercible
                       (LHEnv -> State# RealWorld -> (# State# RealWorld, () #)) (LH ()));
        D g1 ->
          (\ (env [Dmd=<L,U(U(A,A,A,C(C1(U)),C(C1(U(U,U)))),A)>] :: LHEnv)
             (s :: State# RealWorld) ->
             case env of
             { LHEnv ds [Dmd=<S(LLLLC(C(S))),1*U(A,A,A,1*C1(C1(U)),C(C1(U(U,U))))>]
                     ds2 [Dmd=<L,A>] ->
             case ds of
             { HashUpdates ds3 [Dmd=<L,A>] ds4 [Dmd=<L,A>] ds5 [Dmd=<L,A>]
                           ds6 [Dmd=<L,1*C1(C1(U))>] ds7 [Dmd=<C(C(S)),C(C1(U(U,U)))>] ->
             case ((ds7 x_s1FkL)
                   `cast` (N:IO[0] <()>_R
                           :: Coercible
                                (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                    s
             of
             { (# ipv1, ipv2 [Dmd=<L,A>] #) ->
             case g1 of {
               Left l [Dmd=<S,1*U(U)>] ->
                 case l of { I# ipv ->
                 case ((ds7 $fLargeHashableEither2)
                       `cast` (N:IO[0] <()>_R
                               :: Coercible
                                    (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                        ipv1
                 of
                 { (# ipv, ipv1 [Dmd=<L,A>] #) ->
                 ((ds7 (W64# (int2Word# ipv)))
                  `cast` (N:IO[0] <()>_R
                          :: Coercible
                               (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                   ipv
                 }
                 };
               Right r [Dmd=<S,1*U(U)>] ->
                 case r of { C# ipv ->
                 case ((ds7 $fLargeHashableEither1)
                       `cast` (N:IO[0] <()>_R
                               :: Coercible
                                    (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                        ipv1
                 of
                 { (# ipv, ipv1 [Dmd=<L,A>] #) ->
                 ((ds6
                     (let {
                        i# :: Int#
                        [LclId,
                         Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
                                 WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 0 0}]
                        i# = ord# ipv } in
                      case >=# i# 0# of {
                        __DEFAULT -> $wlvl1 i#;
                        1# ->
                          case <=# i# 4294967295# of {
                            __DEFAULT -> $wlvl1 i#;
                            1# -> W32# (int2Word# i#)
                          }
                      }))
                  `cast` (N:IO[0] <()>_R
                          :: Coercible
                               (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                   ipv
                 }
                 }
             }
             }
             }
             })
          `cast` ((<LHEnv>_R
                   %<'Many>_N ->_R Sym (N:IO[0] <()>_R)) ; Sym (N:LH[0] <()>_R)
                  :: Coercible
                       (LHEnv -> State# RealWorld -> (# State# RealWorld, () #)) (LH ()))
      }

x_s1FjX :: Word64
[LclId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
x_s1FjX = W64# 0##

x_s1Fkm :: Word64
[LclId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
x_s1Fkm = W64# 1##

x_s1FkL :: Word64
[LclId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
x_s1FkL = W64# 2##

$j_s1GzQ
  :: (:+:)
       (C1
          ('MetaCons "A" 'PrefixI 'False)
          (S1
             ('MetaSel
                'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
             (Rec0 Int)))
       (C1
          ('MetaCons "B" 'PrefixI 'False)
          (S1
             ('MetaSel
                'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
             (Rec0 Char)))
       Any
     -> LHEnv -> State# RealWorld -> (# State# RealWorld, () #)
[LclId,
 Arity=3,
 Str=<L,1*U><S(S(LLLLC(C(S)))L),1*U(1*U(A,A,A,1*C1(C1(U)),C(C1(U(U,U)))),A)><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [100 20 0] 292 0}]
$j_s1GzQ
  = \ (x [Dmd=<L,1*U>, OS=OneShot]
         :: (:+:)
              (C1
                 ('MetaCons "A" 'PrefixI 'False)
                 (S1
                    ('MetaSel
                       'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                    (Rec0 Int)))
              (C1
                 ('MetaCons "B" 'PrefixI 'False)
                 (S1
                    ('MetaSel
                       'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                    (Rec0 Char)))
              Any)
      (env [Dmd=<S(S(LLLLC(C(S)))L),1*U(1*U(A,A,A,1*C1(C1(U)),C(C1(U(U,U)))),A)>]
         :: LHEnv)
      (s :: State# RealWorld) ->
      case env of
      { LHEnv ds [Dmd=<S(LLLLC(C(S))),1*U(A,A,A,1*C1(C1(U)),C(C1(U(U,U))))>]
              ds2 [Dmd=<L,A>] ->
      case ds of
      { HashUpdates ds3 [Dmd=<L,A>] ds4 [Dmd=<L,A>] ds5 [Dmd=<L,A>]
                    ds6 [Dmd=<L,1*C1(C1(U))>] ds7 [Dmd=<C(C(S)),C(C1(U(U,U)))>] ->
      case ((ds7 x_s1FjX)
            `cast` (N:IO[0] <()>_R
                    :: Coercible
                         (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
             s
      of
      { (# ipv, ipv1 [Dmd=<L,A>] #) ->
      case x of {
        L1 x [Dmd=<L,1*U(U)>] ->
          case ((ds7 x_s1FjX)
                `cast` (N:IO[0] <()>_R
                        :: Coercible
                             (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                 ipv
          of
          { (# ipv, ipv1 [Dmd=<L,A>] #) ->
          ((ds7
              (case x
                    `cast` ((N:M1[0]
                                 <*>_N
                                 <C>_P
                                 <'MetaCons "A" 'PrefixI 'False>_P
                                 <M1
                                    S
                                    ('MetaSel
                                       'Nothing
                                       'NoSourceUnpackedness
                                       'NoSourceStrictness
                                       'DecidedLazy)
                                    (Rec0 Int)>_R ; N:M1[0]
                                                        <*>_N
                                                        <S>_P
                                                        <'MetaSel
                                                           'Nothing
                                                           'NoSourceUnpackedness
                                                           'NoSourceStrictness
                                                           'DecidedLazy>_P
                                                        <K1 R Int>_R) <Any>_N ; (N:K1[0]
                                                                                     <*>_N
                                                                                     <R>_P
                                                                                     <Int>_R
                                                                                     <Any>_P ; Nth:3
                                                                                                   (<Int>_R
                                                                                                    %<'Many>_N ->_R N:LH[0]
                                                                                                                        <()>_R ; (<LHEnv>_R
                                                                                                                                  %<'Many>_N ->_R N:IO[0]
                                                                                                                                                      <()>_R)))
                            :: Coercible
                                 (M1
                                    C
                                    ('MetaCons "A" 'PrefixI 'False)
                                    (M1
                                       S
                                       ('MetaSel
                                          'Nothing
                                          'NoSourceUnpackedness
                                          'NoSourceStrictness
                                          'DecidedLazy)
                                       (Rec0 Int))
                                    Any)
                                 Int)
               of
               { I# x# ->
               W64# (int2Word# x#)
               }))
           `cast` (N:IO[0] <()>_R
                   :: Coercible
                        (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
            ipv
          };
        R1 x [Dmd=<L,1*U(U)>] ->
          case ((ds7 x_s1Fkm)
                `cast` (N:IO[0] <()>_R
                        :: Coercible
                             (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                 ipv
          of
          { (# ipv1, ipv2 [Dmd=<L,A>] #) ->
          ((ds6
              (case x
                    `cast` ((N:M1[0]
                                 <*>_N
                                 <C>_P
                                 <'MetaCons "B" 'PrefixI 'False>_P
                                 <M1
                                    S
                                    ('MetaSel
                                       'Nothing
                                       'NoSourceUnpackedness
                                       'NoSourceStrictness
                                       'DecidedLazy)
                                    (Rec0 Char)>_R ; N:M1[0]
                                                         <*>_N
                                                         <S>_P
                                                         <'MetaSel
                                                            'Nothing
                                                            'NoSourceUnpackedness
                                                            'NoSourceStrictness
                                                            'DecidedLazy>_P
                                                         <K1 R Char>_R) <Any>_N ; (N:K1[0]
                                                                                       <*>_N
                                                                                       <R>_P
                                                                                       <Char>_R
                                                                                       <Any>_P ; Nth:3
                                                                                                     (<Char>_R
                                                                                                      %<'Many>_N ->_R N:LH[0]
                                                                                                                          <()>_R ; (<LHEnv>_R
                                                                                                                                    %<'Many>_N ->_R N:IO[0]
                                                                                                                                                        <()>_R)))
                            :: Coercible
                                 (M1
                                    C
                                    ('MetaCons "B" 'PrefixI 'False)
                                    (M1
                                       S
                                       ('MetaSel
                                          'Nothing
                                          'NoSourceUnpackedness
                                          'NoSourceStrictness
                                          'DecidedLazy)
                                       (Rec0 Char))
                                    Any)
                                 Char)
               of
               { C# c# ->
               let {
                 i# :: Int#
                 [LclId,
                  Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
                          WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 0 0}]
                 i# = ord# c# } in
               case >=# i# 0# of {
                 __DEFAULT -> $wlvl1 i#;
                 1# ->
                   case <=# i# 4294967295# of {
                     __DEFAULT -> $wlvl1 i#;
                     1# -> W32# (int2Word# i#)
                   }
               }
               }))
           `cast` (N:IO[0] <()>_R
                   :: Coercible
                        (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
            ipv1
          }
      }
      }
      }
      }
  at test/Data/LargeHashable/Tests/Inspection.hs:43
*** Failed! (11ms)
…

sternenseemann avatar Jun 14 '22 14:06 sternenseemann