quickcheck

How do you override Haskell type class instances provided by package code?

十年热恋 提交于 2019-11-27 17:55:07
问题 I have some old Haskell code that includes QuickCheck test cases. Newer versions of QuickCheck (I've just upgraded to 2.4.0.1) include type class instances for Arbitrary Word8 and others. These did not exist in older 2.0.x versions of Test.QuickCheck.Arbitrary. While useful in the general sense, the package-provided Arbitrary Word8 generator is not the one I want to use for my test suite: instance Arbitrary Word8 where arbitrary = frequency [(2, oneof [return ctrlFrameDelim, return ctrlEscape