GHC 9.4.3 with -O2 is miscompiling the derived Show and Eq instances for SeqT in logict-sequence.

    main :: IO ()
    main = print (pure 0 :: Seq Int)
    -- -O0, -O1: prints the Seq
    -- -O2: <<loop>>

On top of that, both hedgehog and hspec fail to catch `<<loop>>`.

    main :: IO ()
    main = defaultMain
      [ check $ property $ do
          let x = x :: Int  -- obvious loop compiles to a thrown exception <<loop>>
          if x == x then pure () else pure ()  ]
    -- "thread blocked indefinitely in an STM transaction"
    -- meaning some thread is not getting cleaned up properly

    main :: IO ()
    main = hspec $ do
      describe "work" $ do
        it "works" $ do
          let x = x :: Int  -- obvious loop compiles to a thrown exception <<loop>>
          if x == x then pure () else pure () :: IO ()
    --- hangs

Cheers,
Li-yao


On 2022-11-30 10:33 PM, David Feuer wrote:
The logict-sequence test suite consistently freezes up on the last
test when compiled with GHC 9.4.3. logict-sequence and its test suite
don't do anything special with that GHC/base version as far as I can
see, or anything particularly strange in general, so I'm pretty
confident the problem lies elsewhere. My best guesses are hedgehog,
tasty, and tasty-hedgehog. Has anyone else run into weird issues with
any/all of these on GHC 9.4.3?

David
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.