Closed arybczak closed 6 years ago
Oh, interesting! We use fromEnum
on CUSeconds
, but this is actually a partial function on 32-bit GHC (because a CUSeconds
is really a Word32
which does not fit in an Int
), hence the crash.
Not immediately sure what to do about this, but it should be fixable.
The change in question was made to support GHC 7.2, which defines CUSeconds
but doesn't export its constructor, meaning that we have to write the Arbitrary
instance in an indirect way. One option would be just to drop this support and change back to the previous Arbitrary
instance.
I'm all for dropping support for GHC 7.2, it's 6 years old.
The change in question was made to support GHC 7.2
If this is for 7.2
specifically, then I think there is no big benefit in having this. 7.2
was a tech preview which is/was not widely used for real world stuff. If it's also for 7.0.*
then that is a separate consideration.
@nick8325 I assume this is not what you suggested, but for me it would be fine to drop support for 7.2.*
and older all together. What I care about is that >= 7.4.1
works, that is what hspec
still supports (AFAIK same for tasty
).
7.2
was a tech preview which is/was not widely used for real world stuff.
Ah, I'd forgotten about that. In that case I agree it makes sense to drop support for 7.2 altogether.
Consider the following:
When compiled on multilib x86_64 Gentoo Linux with 64bit GHC-8.0.2 and QuickCheck-2.11.3, the test passes:
However, when compiled with 32bit GHC-8.0.2 and QuickCheck-2.11.3, it fails:
Note that QuickCheck-2.10.0.1 works fine with both 32bit and 64bit GHC versions. It seems that Arbitrary instance for CUSeconds was broken in 2.10.1.