packages feed

Agata-0.1.1: Example.hs

{-#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 $ derive ''X <++> NoArbitrary)
instance (Buildable a, Buildable b) => Arbitrary (X a b) where
 arbitrary = agataWith partitions


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

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