
17 Apr
2010
17 Apr
'10
7:43 p.m.
I'm pleased to announce Agata (Agata Generates Algebraic Types Automatically)! Avoiding excessive details, usage is best described by a small example: {-#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)) This code derives instances of Test.QuickCheck.Arbitrary for the data types X, Y and Z. http://hackage.haskell.org/package/Agata Regards Jonas