[Haskell-cafe] Debugging a test suite freeze

David Feuer david.feuer at gmail.com
Fri Dec 2 02:51:36 UTC 2022


Wow, that's ... interesting. Could this have to do with the way the
constraints are written? Has there been some change in
UndecidableInstances? I'll try simplifying the Eq, Ord, Show, etc.
constraints manually and see if that fixes it.

On Thu, Dec 1, 2022, 7:14 PM Li-yao Xia <lysxia at gmail.com> wrote:

> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20221201/36a156fe/attachment.html>


More information about the Haskell-Cafe mailing list