Module("collection/tuple/common",[Imports([Import("collection/list/cons"),Import("collection/tuple/cons"),Import("collection/list/index"),Import("collection/list/zip")]),Strategies([RDefNoArgs("TupleToList",RuleNoCond(NoAnnoList(Explode(NoAnnoList(Str("\"\"")),Var("xs"))),Var("xs"))),RDefNoArgs("ListToTuple",RuleNoCond(Var("xs"),NoAnnoList(Explode(NoAnnoList(Str("\"\"")),Var("xs"))))),RDefNoArgs("Fst",RuleNoCond(NoAnnoList(Explode(NoAnnoList(Str("\"\"")),NoAnnoList(ListTail([Var("x")],Var("xs"))))),Var("x"))),RDefNoArgs("Snd",RuleNoCond(NoAnnoList(Explode(NoAnnoList(Str("\"\"")),NoAnnoList(ListTail([Var("x"),Var("y")],Var("xs"))))),Var("y"))),RDefNoArgs("Third",RuleNoCond(NoAnnoList(Explode(NoAnnoList(Str("\"\"")),NoAnnoList(ListTail([Var("x"),Var("y"),Var("z")],Var("xs"))))),Var("z"))),RDefNoArgs("Dupl",RuleNoCond(Var("x"),NoAnnoList(Tuple([Var("x"),Var("x")])))),SDef("split",[DefaultVarDec("f"),DefaultVarDec("g")],Build(NoAnnoList(Tuple([RootApp(CallNoArgs(SVar("f"))),RootApp(CallNoArgs(SVar("g")))])))),SDef("split3",[DefaultVarDec("f"),DefaultVarDec("g"),DefaultVarDec("h")],Build(NoAnnoList(Tuple([RootApp(CallNoArgs(SVar("f"))),RootApp(CallNoArgs(SVar("g"))),RootApp(CallNoArgs(SVar("h")))])))),RDefNoArgs("Swap",RuleNoCond(NoAnnoList(Tuple([Var("x"),Var("y")])),NoAnnoList(Tuple([Var("y"),Var("x")])))),SDefNoArgs("Thd",CallNoArgs(SVar("Fst"))),RDefNoArgs("Ttl",RuleNoCond(NoAnnoList(Explode(NoAnnoList(Str("\"\"")),NoAnnoList(ListTail([Var("x")],Var("xs"))))),NoAnnoList(Explode(NoAnnoList(Str("\"\"")),Var("xs"))))),SDefNoArgs("tindex",Seq(TupleCong(Id,[Match(NoAnnoList(Explode(NoAnnoList(Str("\"\"")),RootApp(Id))))]),CallNoArgs(SVar("index")))),SDefNoArgs("is-tuple",Match(NoAnnoList(Explode(NoAnnoList(Str("\"\"")),Wld)))),SDef("flip",[DefaultVarDec("s")],Seq(CallNoArgs(SVar("Swap")),CallNoArgs(SVar("s")))),SDef("tmap",[DefaultVarDec("s")],Seq(CallNoArgs(SVar("is-tuple")),All(CallNoArgs(SVar("s"))))),SDef("tconcat",[DefaultVarDec("s")],Seq(CallNoArgs(SVar("is-tuple")),Call(SVar("crush"),[Build(NoAnnoList(List([]))),CallNoArgs(SVar("s"))]))),SDef("tconcat'",[DefaultVarDec("s1"),DefaultVarDec("s2")],Seq(CallNoArgs(SVar("is-tuple")),Call(SVar("crush"),[BA(CallNoArgs(SVar("s1")),NoAnnoList(List([]))),CallNoArgs(SVar("s2"))]))),SDef("tcata",[DefaultVarDec("s1"),DefaultVarDec("s2")],Seq(CallNoArgs(SVar("is-tuple")),Call(SVar("crush"),[CallNoArgs(SVar("s1")),CallNoArgs(SVar("s2"))]))),SDef("tfoldr",[DefaultVarDec("s1"),DefaultVarDec("s2")],Call(SVar("tcata"),[CallNoArgs(SVar("s1")),CallNoArgs(SVar("s2"))])),SDef("tzip",[DefaultVarDec("s")],Seq(TupleCong(CallNoArgs(SVar("TupleToList")),[CallNoArgs(SVar("TupleToList"))]),Call(SVar("zip"),[CallNoArgs(SVar("s"))]))),SDef("tuple-zip",[DefaultVarDec("s")],Rec("x",LChoice(Build(NoAnnoList(ListTail([RootApp(Seq(Call(SVar("tmap"),[CallNoArgs(SVar("Hd"))]),CallNoArgs(SVar("s"))))],RootApp(Seq(Call(SVar("tmap"),[CallNoArgs(SVar("Tl"))]),CallNoArgs(SVar("x"))))))),Seq(Call(SVar("tmap"),[ListCongNoTail([])]),Build(NoAnnoList(List([]))))))),SDef("tuple-unzip",[DefaultVarDec("s")],Seq(Rec("x",LChoice(Build(NoAnnoList(ListTail([RootApp(Seq(Call(SVar("map"),[CallNoArgs(SVar("Thd"))]),CallNoArgs(SVar("s"))))],RootApp(Seq(Call(SVar("map"),[CallNoArgs(SVar("Ttl"))]),CallNoArgs(SVar("x"))))))),Seq(Call(SVar("map"),[EmptyTupleCong]),Build(NoAnnoList(List([])))))),Build(NoAnnoList(Explode(NoAnnoList(Str("\"\"")),RootApp(Id))))))])])
