On Thu, 27 Oct 2005, Sebastian Sylvan <[EMAIL PROTECTED]> wrote: > instance Arbitrary Word32 where > arbitrary = do c <- arbitrary :: Gen Integer > return (fromIntegral c)
This definition will usually only generate very small or very large Word32 values. The reason is the wrapping mentioned elsewhere and the arbitrary definition for Integer: arbitrary = sized $ \n -> choose (-fromIntegral n,fromIntegral n) You would need to manually ask for larger sizes (using Test.QuickCheck.check with a suitable Config). If a uniform distribution of Word32s is really needed then I would go with the other definition. -- /NAD _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe