darcs patch: Adding Arbitrary instance for Either

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

darcs patch: Adding Arbitrary instance for Either

roconnor
Sun Oct 29 23:28:55 CET 2006  [hidden email]
  * Adding Arbitrary instance for Either


New patches:

[Adding Arbitrary instance for Either
[hidden email]**20061029222855] {
hunk ./Test/QuickCheck.hs 199
+
+instance (Arbitrary a, Arbitrary b) => Arbitrary (Either a b) where
+  arbitrary             = oneof [fmap Left arbitrary, fmap Right arbitrary]
+  coarbitrary (Left x)  = variant 0 . coarbitrary x
+  coarbitrary (Right x) = variant 1 . coarbitrary x
}

Context:

[add boilerplate Setup.hs
Ross Paterson <[hidden email]>**20060928231525]
[note CPP extension
Ross Paterson <[hidden email]>**20060908233707]
[remove obsolete Hugs stuff
Ross Paterson <[hidden email]>**20060904224049]
[Only import Control.Concurrent when using GHC
Einar Karttunen <[hidden email]>**20060308152124]
[TAG Initial conversion from CVS complete
John Goerzen <[hidden email]>**20060112154138]
Patch bundle hash:
3837d39127fe59dbd4ddad2c51aed9078a01b052

_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: darcs patch: Adding Arbitrary instance for Either

roconnor
 <roconnor <at> theorem.ca> writes:

>
> Sun Oct 29 23:28:55 CET 2006  roconnor <at> theorem.ca
>   * Adding Arbitrary instance for Either
>
> Attachment: text/x-darcs-patch, 889 bytes

I've added a trac for this: http://hackage.haskell.org/trac/ghc/ticket/973
I probably should have added the trac to the meta data.  Sorry.

_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries