LeventErkok / sbv

SMT Based Verification in Haskell. Express properties about Haskell programs and automatically prove them using SMT solvers.
https://github.com/LeventErkok/sbv
Other
243 stars 34 forks source link

doctests fail with GHC 9.0.1 #579

Closed LeventErkok closed 2 years ago

LeventErkok commented 3 years ago

With GHC 9.0.1; doctests crash with mysterious output of the form:

*** Exception: Ix{Int}.index: Index (684) out of range ((0,238))

Here's one way to replicate. Run:

$ ghci -package async -package uniplate -package libBF -package syb -package mtl -package random -package QuickCheck Documentation/SBV/Examples/Puzzles/Garden.hs

Then evaluate:

ghci> flowerCount
*** Exception: Ix{Int}.index: Index (172) out of range ((0,44))

Note that the above isn't reliable either. Sometimes it works sometimes it doesn't. But it appears anytime I do make docTest I run into one of these.

I wasn't able to isolate the issue, looks like GHC goes into some weird state. Nor was I able to simplify to come up with a bug-report for GHC.

LeventErkok commented 2 years ago

Now also blocked by https://github.com/sol/doctest/issues/303; so moving to GHC 9.2.1 will even be further delayed

LeventErkok commented 2 years ago

We'll be moving to cabal-docspec instead.. Faster and seems more resilient to changes in GHC: https://github.com/phadej/cabal-extras/tree/master/cabal-docspec