module Data.Derive.ArbitraryOld where
import Data.Derive.DSL.DSL
import Data.Derive.Internal.Derivation
makeArbitraryOld :: Derivation
makeArbitraryOld = derivationDSL "ArbitraryOld" dslArbitraryOld
dslArbitraryOld =
List [Instance ["Arbitrary"] "Arbitrary" (List [App "InsDecl" (
List [App "PatBind" (List [App "PVar" (List [App "Ident" (List [
String "arbitrary"])]),App "Nothing" (List []),App "UnGuardedRhs"
(List [App "Do" (List [List [App "Generator" (List [App "PVar" (
List [App "Ident" (List [String "x"])]),App "App" (List [App "Var"
(List [App "UnQual" (List [App "Ident" (List [String "choose"])])]
),App "Tuple" (List [App "Boxed" (List []),List [App "Lit" (List [
App "Int" (List [Int 0])]),App "InfixApp" (List [App "App" (List [
App "Var" (List [App "UnQual" (List [App "Ident" (List [String
"length"])])]),App "List" (List [MapCtor (App "RecConstr" (List [
App "UnQual" (List [App "Ident" (List [CtorName])]),List []]))])])
,App "QVarOp" (List [App "UnQual" (List [App "Symbol" (List [
String "-"])])]),App "Lit" (List [App "Int" (List [Int 1])])])]])]
)]),App "Qualifier" (List [App "Case" (List [App "Var" (List [App
"UnQual" (List [App "Ident" (List [String "x"])])]),MapCtor (App
"Alt" (List [App "PLit" (List [App "Int" (List [CtorIndex])]),App
"UnGuardedAlt" (List [App "Do" (List [Concat (List [MapField (App
"Generator" (List [App "PVar" (List [App "Ident" (List [Concat (
List [String "x",ShowInt FieldIndex])])]),App "Var" (List [App
"UnQual" (List [App "Ident" (List [String "arbitrary"])])])])),
List [App "Qualifier" (List [App "App" (List [App "Var" (List [App
"UnQual" (List [App "Ident" (List [String "return"])])]),App
"Paren" (List [Application (Concat (List [List [App "Con" (List [
App "UnQual" (List [App "Ident" (List [CtorName])])])],MapField (
App "Var" (List [App "UnQual" (List [App "Ident" (List [Concat (
List [String "x",ShowInt FieldIndex])])])]))]))])])])]])])]),App
"BDecls" (List [List []])]))])])]])]),App "BDecls" (List [List []]
)])]),App "InsDecl" (List [App "FunBind" (List [MapCtor (App
"Match" (List [App "Ident" (List [String "coarbitrary"]),List [App
"PParen" (List [App "PApp" (List [App "UnQual" (List [App "Ident"
(List [CtorName])]),MapField (App "PVar" (List [App "Ident" (List
[Concat (List [String "x",ShowInt FieldIndex])])]))])])],App
"Nothing" (List []),App "UnGuardedRhs" (List [Fold (App "InfixApp"
(List [Head,App "QVarOp" (List [App "UnQual" (List [App "Symbol" (
List [String "."])])]),Tail])) (Concat (List [List [App "App" (
List [App "Var" (List [App "UnQual" (List [App "Ident" (List [
String "variant"])])]),App "Lit" (List [App "Int" (List [CtorIndex
])])])],MapField (App "App" (List [App "Var" (List [App "UnQual" (
List [App "Ident" (List [String "coarbitrary"])])]),App "Var" (
List [App "UnQual" (List [App "Ident" (List [Concat (List [String
"x",ShowInt FieldIndex])])])])]))]))]),App "BDecls" (List [List []
])]))])])])]