input-output-hk/nothunks

Test failures with GHC 9.8.1

Closed this issue · 0 comments

On current master (1495ff2) I am getting test failures when built with GHC 9.8.1.
Update: I am also getting these failures for the released 0.1.4.

 ✗ EXPECTED FAILURE failed at test/Test/NoThunks/Class.hs:176:7
    after 18 tests and 2 shrinks.
    shrink path: 18:b2
    Just ["Int","Seq"] 33% ██████▋·············
    Nothing            61% ████████████▏·······
  
        ┏━━ test/Test/NoThunks/Class.hs ━━━
    163 ┃ testWithModel :: forall a. FromModel a
    164 ┃               => (Maybe ThunkInfo -> Maybe [String] -> Bool)
    165 ┃               -> Proxy a
    166 ┃               -- ^ Compare @ThunkInfo@. When we use 'noThunks' this
    167 ┃               -- can just be @(==)@; however, when we use 'isNormalForm', the
    168 ┃               -- context we will get from the model will be too detailed.
    169 ┃               -> Property
    170 ┃ testWithModel compareInfo _proxy = withTests 1000 $ property $ do
    171 ┃     m :: Model a <- forAll genModel
        ┃     │ Wrap
        ┃     │   { unwrap =
        ┃     │       SeqEnqueue
        ┃     │         (IntValue 0)
        ┃     │         (SeqEnqueue
        ┃     │            (IntValue 0)
        ┃     │            (SeqEnqueue
        ┃     │               (IntValue 0)
        ┃     │               (SeqEnqueue
        ┃     │                  (IntValue 0)
        ┃     │                  (SeqEnqueue (IntValue 0) (SeqEnqueue (IntValue 0) SeqEmpty)))))
        ┃     │   }
    172 ┃     collect $ modelUnexpected [] m
    173 ┃     fromModel m $ \a -> do
    174 ┃       annotate $ show $ modelIsNF [] m
        ┃       │ IsNF
    175 ┃       isNF <- liftIO $ noThunks [] a
    176 ┃       Hedgehog.diff isNF compareInfo (modelUnexpected [] m)
        ┃       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ┃       │ ━━━ Failed (- lhs) (+ rhs) ━━━
        ┃       │ - Just ThunkInfo { thunkContext = [ "..." , "Seq Int" ] }
        ┃       │ + Nothing
  
    This failure can be reproduced by running:
    > recheckAt (Seed 9830890977581035153 3438688580856117965) "18:b2" EXPECTED FAILURE
      IntInt:            FAIL (0.07s)
          ✗ <interactive> failed at test/Test/NoThunks/Class.hs:176:7
            after 1 test and 1 shrink.
            shrink path: 1:a
          
                ┏━━ test/Test/NoThunks/Class.hs ━━━
            163 ┃ testWithModel :: forall a. FromModel a
            164 ┃               => (Maybe ThunkInfo -> Maybe [String] -> Bool)
            165 ┃               -> Proxy a
            166 ┃               -- ^ Compare @ThunkInfo@. When we use 'noThunks' this
            167 ┃               -- can just be @(==)@; however, when we use 'isNormalForm', the
            168 ┃               -- context we will get from the model will be too detailed.
            169 ┃               -> Property
            170 ┃ testWithModel compareInfo _proxy = withTests 1000 $ property $ do
            171 ┃     m :: Model a <- forAll genModel
                ┃     │ PairDefined (IntValue 0) (IntThunk (IntValue 0))
            172 ┃     collect $ modelUnexpected [] m
            173 ┃     fromModel m $ \a -> do
            174 ┃       annotate $ show $ modelIsNF [] m
                ┃       │ IsWHNF ["Int","(,)"]
            175 ┃       isNF <- liftIO $ noThunks [] a
            176 ┃       Hedgehog.diff isNF compareInfo (modelUnexpected [] m)
                ┃       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                ┃       │ ━━━ Failed (- lhs) (+ rhs) ━━━
                ┃       │ - Just ThunkInfo { thunkContext = [ "Int" , "Tuple2" ] }
                ┃       │ + Just [ "Int" , "(,)" ]
          
            This failure can be reproduced by running:
            > recheckAt (Seed 1509894862227899575 3014110894838300521) "1:a" <property>
          
        Use "--pattern '$NF ~ /IntInt/' --hedgehog-replay '1:a Seed 1509894862227899575 3014110894838300521'" to reproduce from the command-line.
        
        Use -p '/Model.IntInt/' to rerun this test only.
      IntListInt:        FAIL (0.07s)
          ✗ <interactive> failed at test/Test/NoThunks/Class.hs:176:7
            after 1 test.
            shrink path: 1:
          
                ┏━━ test/Test/NoThunks/Class.hs ━━━
            163 ┃ testWithModel :: forall a. FromModel a
            164 ┃               => (Maybe ThunkInfo -> Maybe [String] -> Bool)
            165 ┃               -> Proxy a
            166 ┃               -- ^ Compare @ThunkInfo@. When we use 'noThunks' this
            167 ┃               -- can just be @(==)@; however, when we use 'isNormalForm', the
            168 ┃               -- context we will get from the model will be too detailed.
            169 ┃               -> Property
            170 ┃ testWithModel compareInfo _proxy = withTests 1000 $ property $ do
            171 ┃     m :: Model a <- forAll genModel
                ┃     │ PairDefined (IntThunk (IntValue 0)) ListNil
            172 ┃     collect $ modelUnexpected [] m
            173 ┃     fromModel m $ \a -> do
            174 ┃       annotate $ show $ modelIsNF [] m
                ┃       │ IsWHNF ["Int","(,)"]
            175 ┃       isNF <- liftIO $ noThunks [] a
            176 ┃       Hedgehog.diff isNF compareInfo (modelUnexpected [] m)
                ┃       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                ┃       │ ━━━ Failed (- lhs) (+ rhs) ━━━
                ┃       │ - Just ThunkInfo { thunkContext = [ "Int" , "Tuple2" ] }
                ┃       │ + Just [ "Int" , "(,)" ]
          
            This failure can be reproduced by running:
            > recheckAt (Seed 18426870851181589552 15121270568925645443) "1:" <property>
          
        Use "--pattern '$NF ~ /IntListInt/' --hedgehog-replay '1: Seed 18426870851181589552 15121270568925645443'" to reproduce from the command-line.
        
        Use -p '/Model.IntListInt/' to rerun this test only.

Maybe it is just a case of an updated printer:

- Just ThunkInfo { thunkContext = [ "Int" , "Tuple2" ] }
+ Just [ "Int" , "(,)" ]