[Haskell-cafe] QuickCheck behaving strange
Tobias Olausson
tobsan at gmail.com
Fri Jul 24 14:41:50 EDT 2009
It seems this was the case, thank you!
/Tobias
2009/7/24 Felipe Lessa <felipe.lessa at gmail.com>:
> On Fri, Jul 24, 2009 at 08:11:12PM +0200, Tobias Olausson wrote:
>> prop_schedule :: Ord t => [Interval a t] -> Bool
>> prop_schedule [] = True
>> prop_schedule [a] = True
>> prop_schedule (x:y:ys) = end x <= begin y && prop_schedule (y:ys)
> [..]
>> How come QuickCheck passes 100 tests of random lists? One would think that
>> at least one of the generated lists would be unsorted. It also passes
>> 1000 and even
>> 10000 tests.
>
> Probably it was defaulting to 'Interval () ()'. Try to do
>
> :s -Wall
>
> on your GHCi prompt to see when these things happen.
>
> --
> Felipe.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
--
Tobias Olausson
tobsan at gmail.com
More information about the Haskell-Cafe
mailing list