<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Wow, very cool! &nbsp;This is so helpful I'm surprised it isn't part of QuickCheck. &nbsp;Why isn't it?<div><br></div><div>Regards,</div><div>Duane Johnson</div><div><br><div><div>On Apr 17, 2010, at 6:43 PM, Jonas Almström Duregård wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">{-#LANGUAGE TemplateHaskell #-}<br>import Test.QuickCheck<br>import Test.AgataTH<br><br>data X a b = X [Either a b] deriving Show<br>data Y = Y deriving Show<br>data Z = Z deriving Show<br><br>$(agatath $ deriveall [''X,''Y,''Z])<br><br>main = sample (arbitrary :: Gen (X Y Z))<br></span></blockquote></div><br></div></body></html>