[Haskell-cafe] ANNOUNCE: Agata-0.2.0

Jonas Almström Duregård jonas.duregard at gmail.com
Sat Apr 17 19:43:10 EDT 2010


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


More information about the Haskell-Cafe mailing list