[Haskell-cafe] Quickcheck examples and Data.Word32

Sebastian Sylvan sebastian.sylvan at gmail.com
Thu Oct 27 10:44:49 EDT 2005


On 10/27/05, Joel Reymont <joelr1 at gmail.com> wrote:
> Folks,
>
> Does anyone have QuickCheck examples they could send me?
>
> Also, how can I check Word32, Word64, etc. properties? It looks like
> the built-in random generator only works with Int values and for the
> life of me I cannot figure out how to extend it.
>

Something like (untested!):

instance Arbitrary Word32 where
    arbitrary = arbitrary :: Gen Integer >>= return . fromIntegral


--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862


More information about the Haskell-Cafe mailing list