[Haskell-cafe] SmallCheck Depth
Roman Cheplyaka
roma at ro-che.info
Thu Feb 5 11:06:40 UTC 2015
The choice of what belongs to what depth is rather arbitrary.
You say you'd expect all three constructors to be of depth 0. What about
data A = A1 .. A50
?
What about Char or Int?
See the problem?
On 05/02/15 03:23, Omari Norman wrote:
> The original SmallCheck paper [0] gives a type
>
> data Name = P | Q | R
>
> and states that all values of type Name have depth 0. To me this
> suggests that all values of type Bool would have depth 0 as well,
> seeing as Bool would simply be
>
> data Bool = True | False
>
> Sure enough, if I load up ghci with SmallCheck 0.2.1, I get
>
>> series 0 :: [Bool]
> [True, False]
>
> But in QuickCheck 1.1.1 I get
>
>> list 0 series :: [Bool]
> []
>
> Very puzzling to me is that it seems the definition of series for Bool
> has not changed in the new version. Both versions have something like
>
> series = cons0 True \/ cons0 False
>
> So what explains the different behavior? Thanks. --Omari
>
> [0] http://www.cs.york.ac.uk/fp/smallcheck/smallcheck.pdf
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list