On 5 May 2010 11:38, Tim Docker <[email protected]> wrote:

> On 5 May 2010 09:01, Ozgur Akgun <[email protected]> wrote:
> >         your quick check property (in a different way of writing) is
> >         the following:
> >
> >         prop_1 :: Maybe Double -> Bool
> >         prop_1 v = v == v
>
> I think you misunderstood me. The property was fabricated just for
> the example.
>

OK that's possible :)


>
> My question was why, when I generate random values for (Maybe t, Maybe
> t) using the Arbitrary type class, do I always see two Nothing values
> or two Just values, and never one of each?
>
>
Let me try to understand you then. What happens when you run the following
command in ghci?

sample (arbitrary :: Gen (Maybe Int, Maybe Int) )

Do you still always get (Just _, Just _) or (Nothing, Nothing) pairs, or do
you also get some (Nothing, Just _) or (Just _, Nothing) pairs?

Ozgur
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to