Wow, very cool! This is so helpful I'm surprised it isn't part of QuickCheck. Why isn't it?

Regards,
Duane Johnson

On Apr 17, 2010, at 6:43 PM, Jonas Almström Duregård wrote:

{-#LANGUAGE TemplateHaskell #-}
import Test.QuickCheck
import Test.AgataTH

data X a b = X [Either a b] deriving Show
data Y = Y deriving Show
data Z = Z deriving Show

$(agatath $ deriveall [''X,''Y,''Z])

main = sample (arbitrary :: Gen (X Y Z))

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

Reply via email to