testFullEquiRec :: SpecWith ()
testFullEquiRec = test s "FullEquiRec" input output
  where
    s :: Syntactic '[TmApp, TyArr, TmCase, TmRecord, TyRecord, TmFloat, TmLet, TmFix, TmString, TmLam2, TmBool, TmNat, TmArith, TmAscribe, TmAssign, TyVariant, TmTag, TmTry, TmError, TyRec, TyRef, TmRef, TmDeref, TySource ,TySink, TmUnit, TyUnit, TyBool, TyNat, TyTop, TyBot, TyString, TyVar, TmVar]
    s = crep
    input = [
      "\\f:(Rec X.A->A).\\x:A.f x",
      "\\x:<a:Bool, b:Bool>.x",
      "Rec P.{get:Nat, inc:Unit->P}",
      "Rec A.Nat->A",
      "let g = fix (\\f:Nat->(Rec A.Nat->A).\\n:Nat.f) in unit",
      "\\l:NList.case l of <nil=u> => true | <cons=p> => false",
      "fix (\\p:Nat->Nat->Nat.\\m:Nat.\\n:Nat.if iszero m then n else succ (p (pred m) n))"]
    output = [
      "(\\f:Rec X.A->A.\\x:A.f x)",
      "\\x:<a:Bool, b:Bool>.x",
      "Rec P.{get:Nat, inc:Unit->P}",
      "Rec A.Nat->A",
      "let g = fix (\\f:Nat->Rec A.Nat->A.\\n:Nat.f) in unit",
      "\\l:NList.case l of <nil=u> => true | <cons=p> => false",
      "fix (\\p:Nat->Nat->Nat.\\m:Nat.\\n:Nat.(if iszero (m) then n else succ (((p pred (m)) n))))"]
testFullEquiRec :: SpecWith ()
testFullEquiRec = test s "FullEquiRec" input output
  where
    s :: Syntactic '[TmApp, TyArr, TmCase, TmRecord, TyRecord, TmFloat, TmLet, TmFix, TmString, TmLam2, TmBool, TmNat, TmArith, TmAscribe, TmAssign, TyVariant, TmTag, TmTry, TmError, TyRec, TyRef, TmRef, TmDeref, TySource ,TySink, TmUnit, TyUnit, TyBool, TyNat, TyTop, TyBot, TyString, TyVar, TmVar]
    s = crep
    input = [
      "\\f:(Rec X.A->A).\\x:A.f x",
      "\\x:<a:Bool, b:Bool>.x",
      "Rec P.{get:Nat, inc:Unit->P}",
      "Rec A.Nat->A",
      "let g = fix (\\f:Nat->(Rec A.Nat->A).\\n:Nat.f) in unit",
      "\\l:NList.case l of <nil=u> => true | <cons=p> => false",
      "fix (\\p:Nat->Nat->Nat.\\m:Nat.\\n:Nat.if iszero m then n else succ (p (pred m) n))"]
    output = [
      "(\\f:Rec X.A->A.\\x:A.f x)",
      "\\x:<a:Bool, b:Bool>.x",
      "Rec P.{get:Nat, inc:Unit->P}",
      "Rec A.Nat->A",
      "let g = fix (\\f:Nat->Rec A.Nat->A.\\n:Nat.f) in unit",
      "\\l:NList.case l of <nil=u> => true | <cons=p> => false",
      "fix (\\p:Nat->Nat->Nat.\\m:Nat.\\n:Nat.(if iszero (m) then n else succ (((p pred (m)) n))))"]
testFullEquiRec = test s "FullEquiRec" input output
  where
    s :: Syntactic '[TmApp, TyArr, TmCase, TmRecord, TyRecord, TmFloat, TmLet, TmFix, TmString, TmLam2, TmBool, TmNat, TmArith, TmAscribe, TmAssign, TyVariant, TmTag, TmTry, TmError, TyRec, TyRef, TmRef, TmDeref, TySource ,TySink, TmUnit, TyUnit, TyBool, TyNat, TyTop, TyBot, TyString, TyVar, TmVar]
    s = crep
    input = [
      "\\f:(Rec X.A->A).\\x:A.f x",
      "\\x:<a:Bool, b:Bool>.x",
      "Rec P.{get:Nat, inc:Unit->P}",
      "Rec A.Nat->A",
      "let g = fix (\\f:Nat->(Rec A.Nat->A).\\n:Nat.f) in unit",
      "\\l:NList.case l of <nil=u> => true | <cons=p> => false",
      "fix (\\p:Nat->Nat->Nat.\\m:Nat.\\n:Nat.if iszero m then n else succ (p (pred m) n))"]
    output = [
      "(\\f:Rec X.A->A.\\x:A.f x)",
      "\\x:<a:Bool, b:Bool>.x",
      "Rec P.{get:Nat, inc:Unit->P}",
      "Rec A.Nat->A",
      "let g = fix (\\f:Nat->Rec A.Nat->A.\\n:Nat.f) in unit",
      "\\l:NList.case l of <nil=u> => true | <cons=p> => false",
      "fix (\\p:Nat->Nat->Nat.\\m:Nat.\\n:Nat.(if iszero (m) then n else succ (((p pred (m)) n))))"]