Compilation error with GHC 8.6.5
chshersh opened this issue · 2 comments
chshersh commented
Thanks for maintaining this very useful package!
While using it in my packages, I noticed that recently it's started failing to build with GHC 8.6.5 with the following error:
[1 of 1] Compiling Test.Hspec.Hedgehog ( src/Test/Hspec/Hedgehog.hs, /home/shersh/haskell/sandbox/hspec-hedgehog/dist-newstyle/build/x86_64-linux/ghc-8.6.5/hspec-hedgehog-0.0.1.2/noopt/build/Test/Hspec/Hedgehog.o )
src/Test/Hspec/Hedgehog.hs:198:66: error:
• Couldn't match representation of type ‘tf-random-0.5:System.Random.TF.Gen.TFGen’
with that of ‘System.Random.SplitMix.SMGen’
arising from a use of ‘coerce’
• In the first argument of ‘unseedSMGen’, namely ‘(coerce rng)’
In the second argument of ‘uncurry’, namely
‘(unseedSMGen (coerce rng))’
In the first argument of ‘pure’, namely
‘(uncurry Seed (unseedSMGen (coerce rng)))’
|
198 | Just (rng, _) -> pure (uncurry Seed (unseedSMGen (coerce rng)))
| ^^^^^^^^^^
Would it be possible to patch the code to make hspec-hedgehog
build with GHC 8.6.5?
parsonsmatt commented
Yeah, should be possible! Looks like we have a mismatch on the random
version using a different generator. Version bounds or CPP are probably the right choice here.
chshersh commented
This seems to be resolved now as hspec-hedgehog
started building on GHC 8.6.5 again. So I'm closing this issue.