{-# OPTIONS -cpp -O0  #-}

{-# LANGUAGE RankNTypes, ScopedTypeVariables, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}

module Curry.Module.CurrySyntax (module Curry.Module.CurrySyntax) where

import Curry.RunTimeSystem
import Curry.Module.Directory
import Curry.Module.Distribution
import Curry.Module.FileGoodies
import Curry.Module.Prelude
import Curry.Module.ReadShowTerm



-- begin included



-- end included

type C_Pos = Curry.Module.Prelude.T2 Curry.Module.Prelude.C_Int Curry.Module.Prelude.C_Int

type C_ModuleIdent = Curry.Module.Prelude.List Curry.Module.Prelude.C_Char

data C_Position = C_Position (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char) Curry.Module.Prelude.C_Int Curry.Module.Prelude.C_Int
  | C_PositionFail Curry.RunTimeSystem.C_Exceptions
  | C_PositionOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_Position)

data C_Ident = C_Ident (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char) Curry.Module.Prelude.C_Int
  | C_IdentFail Curry.RunTimeSystem.C_Exceptions
  | C_IdentOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_Ident)

data C_QualIdent = C_UnqualIdent Curry.Module.CurrySyntax.C_Ident
  | C_QualIdent (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char) Curry.Module.CurrySyntax.C_Ident
  | C_QualIdentFail Curry.RunTimeSystem.C_Exceptions
  | C_QualIdentOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_QualIdent)

data C_Module t0 = C_Module (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char) (Curry.Module.Prelude.C_Maybe (Curry.Module.CurrySyntax.C_ExportSpec t0)) (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Decl t0))
  | C_ModuleFail Curry.RunTimeSystem.C_Exceptions
  | C_ModuleOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Module t0))

data C_ExportSpec t0 = C_Exporting t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Export)
  | C_ExportSpecFail Curry.RunTimeSystem.C_Exceptions
  | C_ExportSpecOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_ExportSpec t0))

data C_Export = C_Export Curry.Module.CurrySyntax.C_QualIdent
  | C_ExportTypeWith Curry.Module.CurrySyntax.C_QualIdent (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident)
  | C_ExportTypeAll Curry.Module.CurrySyntax.C_QualIdent
  | C_ExportModule (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char)
  | C_ExportFail Curry.RunTimeSystem.C_Exceptions
  | C_ExportOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_Export)

data C_ImportSpec t0 = C_Importing t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Import)
  | C_Hiding t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Import)
  | C_ImportSpecFail Curry.RunTimeSystem.C_Exceptions
  | C_ImportSpecOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_ImportSpec t0))

data C_Import = C_Import Curry.Module.CurrySyntax.C_Ident
  | C_ImportTypeWith Curry.Module.CurrySyntax.C_Ident (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident)
  | C_ImportTypeAll Curry.Module.CurrySyntax.C_Ident
  | C_ImportFail Curry.RunTimeSystem.C_Exceptions
  | C_ImportOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_Import)

data C_Decl t0 = C_ImportDecl t0 (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char) Curry.Module.Prelude.C_Bool (Curry.Module.Prelude.C_Maybe (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char)) (Curry.Module.Prelude.C_Maybe (Curry.Module.CurrySyntax.C_ImportSpec t0))
  | C_InfixDecl t0 Curry.Module.CurrySyntax.C_Infix Curry.Module.Prelude.C_Int (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident)
  | C_DataDecl t0 Curry.Module.CurrySyntax.C_Ident (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_ConstrDecl t0))
  | C_NewtypeDecl t0 Curry.Module.CurrySyntax.C_Ident (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) (Curry.Module.CurrySyntax.C_NewConstrDecl t0)
  | C_TypeDecl t0 Curry.Module.CurrySyntax.C_Ident (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) Curry.Module.CurrySyntax.C_TypeExpr
  | C_TypeSig t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) Curry.Module.CurrySyntax.C_TypeExpr
  | C_EvalAnnot t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) Curry.Module.CurrySyntax.C_EvalAnnotation
  | C_FunctionDecl t0 Curry.Module.CurrySyntax.C_Ident (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Equation t0))
  | C_ExternalDecl t0 Curry.Module.CurrySyntax.C_CallConv (Curry.Module.Prelude.C_Maybe (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char)) Curry.Module.CurrySyntax.C_Ident Curry.Module.CurrySyntax.C_TypeExpr
  | C_FlatExternalDecl t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident)
  | C_PatternDecl t0 (Curry.Module.CurrySyntax.C_ConstrTerm t0) (Curry.Module.CurrySyntax.C_Rhs t0)
  | C_ExtraVariables t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident)
  | C_DeclFail Curry.RunTimeSystem.C_Exceptions
  | C_DeclOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Decl t0))

data C_ConstrDecl t0 = C_ConstrDecl t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) Curry.Module.CurrySyntax.C_Ident (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_TypeExpr)
  | C_ConOpDecl t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) Curry.Module.CurrySyntax.C_TypeExpr Curry.Module.CurrySyntax.C_Ident Curry.Module.CurrySyntax.C_TypeExpr
  | C_ConstrDeclFail Curry.RunTimeSystem.C_Exceptions
  | C_ConstrDeclOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_ConstrDecl t0))

data C_NewConstrDecl t0 = C_NewConstrDecl t0 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) Curry.Module.CurrySyntax.C_Ident Curry.Module.CurrySyntax.C_TypeExpr
  | C_NewConstrDeclFail Curry.RunTimeSystem.C_Exceptions
  | C_NewConstrDeclOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_NewConstrDecl t0))

data C_Infix = C_InfixL
  | C_InfixR
  | C_Infix
  | C_InfixFail Curry.RunTimeSystem.C_Exceptions
  | C_InfixOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_Infix)

data C_EvalAnnotation = C_EvalRigid
  | C_EvalChoice
  | C_EvalAnnotationFail Curry.RunTimeSystem.C_Exceptions
  | C_EvalAnnotationOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_EvalAnnotation)

data C_CallConv = C_CallConvPrimitive
  | C_CallConvCCall
  | C_CallConvFail Curry.RunTimeSystem.C_Exceptions
  | C_CallConvOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_CallConv)

data C_TypeExpr = C_ConstructorType Curry.Module.CurrySyntax.C_QualIdent (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_TypeExpr)
  | C_VariableType Curry.Module.CurrySyntax.C_Ident
  | C_TupleType (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_TypeExpr)
  | C_ListType Curry.Module.CurrySyntax.C_TypeExpr
  | C_ArrowType Curry.Module.CurrySyntax.C_TypeExpr Curry.Module.CurrySyntax.C_TypeExpr
  | C_RecordType (Curry.Module.Prelude.List (Curry.Module.Prelude.T2 (Curry.Module.Prelude.List Curry.Module.CurrySyntax.C_Ident) Curry.Module.CurrySyntax.C_TypeExpr)) (Curry.Module.Prelude.C_Maybe Curry.Module.CurrySyntax.C_TypeExpr)
  | C_TypeExprFail Curry.RunTimeSystem.C_Exceptions
  | C_TypeExprOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_TypeExpr)

data C_Equation t0 = C_Equation t0 (Curry.Module.CurrySyntax.C_Lhs t0) (Curry.Module.CurrySyntax.C_Rhs t0)
  | C_EquationFail Curry.RunTimeSystem.C_Exceptions
  | C_EquationOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Equation t0))

data C_Lhs t0 = C_FunLhs Curry.Module.CurrySyntax.C_Ident (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_ConstrTerm t0))
  | C_OpLhs (Curry.Module.CurrySyntax.C_ConstrTerm t0) Curry.Module.CurrySyntax.C_Ident (Curry.Module.CurrySyntax.C_ConstrTerm t0)
  | C_ApLhs (Curry.Module.CurrySyntax.C_Lhs t0) (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_ConstrTerm t0))
  | C_LhsFail Curry.RunTimeSystem.C_Exceptions
  | C_LhsOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Lhs t0))

data C_Rhs t0 = C_SimpleRhs t0 (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Decl t0))
  | C_GuardedRhs (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_CondExpr t0)) (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Decl t0))
  | C_RhsFail Curry.RunTimeSystem.C_Exceptions
  | C_RhsOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Rhs t0))

data C_CondExpr t0 = C_CondExpr t0 (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_CondExprFail Curry.RunTimeSystem.C_Exceptions
  | C_CondExprOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_CondExpr t0))

data C_Literal = C_Char Curry.Module.Prelude.C_Char
  | C_Int Curry.Module.CurrySyntax.C_Ident Curry.Module.Prelude.C_Int
  | C_Float Curry.Module.Prelude.C_Float
  | C_String (Curry.Module.Prelude.List Curry.Module.Prelude.C_Char)
  | C_LiteralFail Curry.RunTimeSystem.C_Exceptions
  | C_LiteralOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_Literal)

data C_ConstrTerm t0 = C_LiteralPattern Curry.Module.CurrySyntax.C_Literal
  | C_NegativePattern Curry.Module.CurrySyntax.C_Ident Curry.Module.CurrySyntax.C_Literal
  | C_VariablePattern Curry.Module.CurrySyntax.C_Ident
  | C_ConstructorPattern Curry.Module.CurrySyntax.C_QualIdent (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_ConstrTerm t0))
  | C_InfixPattern (Curry.Module.CurrySyntax.C_ConstrTerm t0) Curry.Module.CurrySyntax.C_QualIdent (Curry.Module.CurrySyntax.C_ConstrTerm t0)
  | C_ParenPattern (Curry.Module.CurrySyntax.C_ConstrTerm t0)
  | C_TuplePattern (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_ConstrTerm t0))
  | C_ListPattern (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_ConstrTerm t0))
  | C_AsPattern Curry.Module.CurrySyntax.C_Ident (Curry.Module.CurrySyntax.C_ConstrTerm t0)
  | C_LazyPattern (Curry.Module.CurrySyntax.C_ConstrTerm t0)
  | C_FunctionPattern Curry.Module.CurrySyntax.C_QualIdent (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_ConstrTerm t0))
  | C_InfixFuncPattern (Curry.Module.CurrySyntax.C_ConstrTerm t0) Curry.Module.CurrySyntax.C_QualIdent (Curry.Module.CurrySyntax.C_ConstrTerm t0)
  | C_RecordPattern (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Field t0 (Curry.Module.CurrySyntax.C_ConstrTerm t0))) (Curry.Module.Prelude.C_Maybe (Curry.Module.CurrySyntax.C_ConstrTerm t0))
  | C_ConstrTermFail Curry.RunTimeSystem.C_Exceptions
  | C_ConstrTermOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_ConstrTerm t0))

data C_Expression t0 = C_Literal Curry.Module.CurrySyntax.C_Literal
  | C_Variable Curry.Module.CurrySyntax.C_QualIdent
  | C_Constructor Curry.Module.CurrySyntax.C_QualIdent
  | C_Paren (Curry.Module.CurrySyntax.C_Expression t0)
  | C_Typed (Curry.Module.CurrySyntax.C_Expression t0) Curry.Module.CurrySyntax.C_TypeExpr
  | C_Tuple (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Expression t0))
  | C_List (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Expression t0))
  | C_ListCompr (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Statement t0))
  | C_EnumFrom (Curry.Module.CurrySyntax.C_Expression t0)
  | C_EnumFromThen (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_EnumFromTo (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_EnumFromThenTo (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_UnaryMinus Curry.Module.CurrySyntax.C_Ident (Curry.Module.CurrySyntax.C_Expression t0)
  | C_Apply (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_InfixApply (Curry.Module.CurrySyntax.C_Expression t0) Curry.Module.CurrySyntax.C_InfixOp (Curry.Module.CurrySyntax.C_Expression t0)
  | C_LeftSection (Curry.Module.CurrySyntax.C_Expression t0) Curry.Module.CurrySyntax.C_InfixOp
  | C_RightSection Curry.Module.CurrySyntax.C_InfixOp (Curry.Module.CurrySyntax.C_Expression t0)
  | C_Lambda (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_ConstrTerm t0)) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_Let (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Decl t0)) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_Do (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Statement t0)) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_IfThenElse (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_Case (Curry.Module.CurrySyntax.C_Expression t0) (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Alt t0))
  | C_RecordConstr (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Field t0 (Curry.Module.CurrySyntax.C_Expression t0)))
  | C_RecordSelection (Curry.Module.CurrySyntax.C_Expression t0) Curry.Module.CurrySyntax.C_Ident
  | C_RecordUpdate (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Field t0 (Curry.Module.CurrySyntax.C_Expression t0))) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_ExpressionFail Curry.RunTimeSystem.C_Exceptions
  | C_ExpressionOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Expression t0))

data C_InfixOp = C_InfixOp Curry.Module.CurrySyntax.C_QualIdent
  | C_InfixConstr Curry.Module.CurrySyntax.C_QualIdent
  | C_InfixOpFail Curry.RunTimeSystem.C_Exceptions
  | C_InfixOpOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches Curry.Module.CurrySyntax.C_InfixOp)

data C_Statement t0 = C_StmtExpr (Curry.Module.CurrySyntax.C_Expression t0)
  | C_StmtDecl (Curry.Module.Prelude.List (Curry.Module.CurrySyntax.C_Decl t0))
  | C_StmtBind (Curry.Module.CurrySyntax.C_ConstrTerm t0) (Curry.Module.CurrySyntax.C_Expression t0)
  | C_StatementFail Curry.RunTimeSystem.C_Exceptions
  | C_StatementOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Statement t0))

data C_Alt t0 = C_Alt t0 (Curry.Module.CurrySyntax.C_ConstrTerm t0) (Curry.Module.CurrySyntax.C_Rhs t0)
  | C_AltFail Curry.RunTimeSystem.C_Exceptions
  | C_AltOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Alt t0))

data C_Field t0 t1 = C_Field t0 Curry.Module.CurrySyntax.C_Ident t1
  | C_FieldFail Curry.RunTimeSystem.C_Exceptions
  | C_FieldOr Curry.RunTimeSystem.OrRef (Curry.RunTimeSystem.Branches (Curry.Module.CurrySyntax.C_Field t0 t1))

instance BaseCurry Curry.Module.CurrySyntax.C_Position where
  nf f (Curry.Module.CurrySyntax.C_Position x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Position(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Position x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Position(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_PositionOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_Position(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_PositionFail

  branching  = Curry.Module.CurrySyntax.C_PositionOr

  consKind (Curry.Module.CurrySyntax.C_PositionOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_PositionFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_PositionFail x) = x

  orRef (Curry.Module.CurrySyntax.C_PositionOr x _) = x

  branches (Curry.Module.CurrySyntax.C_PositionOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_Ident where
  nf f (Curry.Module.CurrySyntax.C_Ident x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Ident(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Ident x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Ident(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_IdentOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_Ident(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_IdentFail

  branching  = Curry.Module.CurrySyntax.C_IdentOr

  consKind (Curry.Module.CurrySyntax.C_IdentOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_IdentFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_IdentFail x) = x

  orRef (Curry.Module.CurrySyntax.C_IdentOr x _) = x

  branches (Curry.Module.CurrySyntax.C_IdentOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_QualIdent where
  nf f (Curry.Module.CurrySyntax.C_UnqualIdent x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_UnqualIdent(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_QualIdent x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_QualIdent(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_UnqualIdent x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_UnqualIdent(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_QualIdent x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_QualIdent(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_QualIdentOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_UnqualIdent(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_QualIdent(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_QualIdentFail

  branching  = Curry.Module.CurrySyntax.C_QualIdentOr

  consKind (Curry.Module.CurrySyntax.C_QualIdentOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_QualIdentFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_QualIdentFail x) = x

  orRef (Curry.Module.CurrySyntax.C_QualIdentOr x _) = x

  branches (Curry.Module.CurrySyntax.C_QualIdentOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_Module t0) where
  nf f (Curry.Module.CurrySyntax.C_Module x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Module(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Module x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Module(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_ModuleOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_Module(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_ModuleFail

  branching  = Curry.Module.CurrySyntax.C_ModuleOr

  consKind (Curry.Module.CurrySyntax.C_ModuleOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_ModuleFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_ModuleFail x) = x

  orRef (Curry.Module.CurrySyntax.C_ModuleOr x _) = x

  branches (Curry.Module.CurrySyntax.C_ModuleOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_ExportSpec t0) where
  nf f (Curry.Module.CurrySyntax.C_Exporting x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Exporting(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Exporting x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Exporting(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_ExportSpecOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_Exporting(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_ExportSpecFail

  branching  = Curry.Module.CurrySyntax.C_ExportSpecOr

  consKind (Curry.Module.CurrySyntax.C_ExportSpecOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_ExportSpecFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_ExportSpecFail x) = x

  orRef (Curry.Module.CurrySyntax.C_ExportSpecOr x _) = x

  branches (Curry.Module.CurrySyntax.C_ExportSpecOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_Export where
  nf f (Curry.Module.CurrySyntax.C_Export x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Export(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ExportTypeWith x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ExportTypeWith(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ExportTypeAll x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ExportTypeAll(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ExportModule x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ExportModule(v1))(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Export x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Export(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ExportTypeWith x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ExportTypeWith(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ExportTypeAll x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ExportTypeAll(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ExportModule x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ExportModule(v1))(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_ExportOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_Export(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ExportTypeWith(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ExportTypeAll(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ExportModule(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_ExportFail

  branching  = Curry.Module.CurrySyntax.C_ExportOr

  consKind (Curry.Module.CurrySyntax.C_ExportOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_ExportFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_ExportFail x) = x

  orRef (Curry.Module.CurrySyntax.C_ExportOr x _) = x

  branches (Curry.Module.CurrySyntax.C_ExportOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_ImportSpec t0) where
  nf f (Curry.Module.CurrySyntax.C_Importing x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Importing(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Hiding x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Hiding(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Importing x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Importing(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Hiding x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Hiding(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_ImportSpecOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_Importing(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Hiding(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_ImportSpecFail

  branching  = Curry.Module.CurrySyntax.C_ImportSpecOr

  consKind (Curry.Module.CurrySyntax.C_ImportSpecOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_ImportSpecFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_ImportSpecFail x) = x

  orRef (Curry.Module.CurrySyntax.C_ImportSpecOr x _) = x

  branches (Curry.Module.CurrySyntax.C_ImportSpecOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_Import where
  nf f (Curry.Module.CurrySyntax.C_Import x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Import(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ImportTypeWith x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ImportTypeWith(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ImportTypeAll x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ImportTypeAll(v1))(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Import x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Import(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ImportTypeWith x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ImportTypeWith(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ImportTypeAll x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ImportTypeAll(v1))(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_ImportOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_Import(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ImportTypeWith(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ImportTypeAll(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_ImportFail

  branching  = Curry.Module.CurrySyntax.C_ImportOr

  consKind (Curry.Module.CurrySyntax.C_ImportOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_ImportFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_ImportFail x) = x

  orRef (Curry.Module.CurrySyntax.C_ImportOr x _) = x

  branches (Curry.Module.CurrySyntax.C_ImportOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_Decl t0) where
  nf f (Curry.Module.CurrySyntax.C_ImportDecl x1 x2 x3 x4 x5) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> Curry.RunTimeSystem.nfCTC(\ v5 state5 -> f(Curry.Module.CurrySyntax.C_ImportDecl(v1)(v2)(v3)(v4)(v5))(state5))(x5)(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_InfixDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_InfixDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_DataDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_DataDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_NewtypeDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_NewtypeDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_TypeDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_TypeDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_TypeSig x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_TypeSig(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_EvalAnnot x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_EvalAnnot(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_FunctionDecl x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_FunctionDecl(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ExternalDecl x1 x2 x3 x4 x5) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> Curry.RunTimeSystem.nfCTC(\ v5 state5 -> f(Curry.Module.CurrySyntax.C_ExternalDecl(v1)(v2)(v3)(v4)(v5))(state5))(x5)(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_FlatExternalDecl x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_FlatExternalDecl(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_PatternDecl x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_PatternDecl(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ExtraVariables x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ExtraVariables(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_ImportDecl x1 x2 x3 x4 x5) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> Curry.RunTimeSystem.gnfCTC(\ v5 state5 -> f(Curry.Module.CurrySyntax.C_ImportDecl(v1)(v2)(v3)(v4)(v5))(state5))(x5)(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_InfixDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_InfixDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_DataDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_DataDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_NewtypeDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_NewtypeDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_TypeDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_TypeDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_TypeSig x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_TypeSig(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_EvalAnnot x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_EvalAnnot(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_FunctionDecl x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_FunctionDecl(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ExternalDecl x1 x2 x3 x4 x5) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> Curry.RunTimeSystem.gnfCTC(\ v5 state5 -> f(Curry.Module.CurrySyntax.C_ExternalDecl(v1)(v2)(v3)(v4)(v5))(state5))(x5)(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_FlatExternalDecl x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_FlatExternalDecl(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_PatternDecl x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_PatternDecl(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ExtraVariables x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ExtraVariables(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_DeclOr(Curry.RunTimeSystem.mkRef(r)(5)(i))([Curry.Module.CurrySyntax.C_ImportDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((4::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_InfixDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_DataDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_NewtypeDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_TypeDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_TypeSig(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_EvalAnnot(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_FunctionDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ExternalDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((4::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_FlatExternalDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_PatternDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ExtraVariables(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(5)

  failed  = Curry.Module.CurrySyntax.C_DeclFail

  branching  = Curry.Module.CurrySyntax.C_DeclOr

  consKind (Curry.Module.CurrySyntax.C_DeclOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_DeclFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_DeclFail x) = x

  orRef (Curry.Module.CurrySyntax.C_DeclOr x _) = x

  branches (Curry.Module.CurrySyntax.C_DeclOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_ConstrDecl t0) where
  nf f (Curry.Module.CurrySyntax.C_ConstrDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_ConstrDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ConOpDecl x1 x2 x3 x4 x5) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> Curry.RunTimeSystem.nfCTC(\ v5 state5 -> f(Curry.Module.CurrySyntax.C_ConOpDecl(v1)(v2)(v3)(v4)(v5))(state5))(x5)(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_ConstrDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_ConstrDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ConOpDecl x1 x2 x3 x4 x5) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> Curry.RunTimeSystem.gnfCTC(\ v5 state5 -> f(Curry.Module.CurrySyntax.C_ConOpDecl(v1)(v2)(v3)(v4)(v5))(state5))(x5)(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_ConstrDeclOr(Curry.RunTimeSystem.mkRef(r)(5)(i))([Curry.Module.CurrySyntax.C_ConstrDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ConOpDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((4::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(5)

  failed  = Curry.Module.CurrySyntax.C_ConstrDeclFail

  branching  = Curry.Module.CurrySyntax.C_ConstrDeclOr

  consKind (Curry.Module.CurrySyntax.C_ConstrDeclOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_ConstrDeclFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_ConstrDeclFail x) = x

  orRef (Curry.Module.CurrySyntax.C_ConstrDeclOr x _) = x

  branches (Curry.Module.CurrySyntax.C_ConstrDeclOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_NewConstrDecl t0) where
  nf f (Curry.Module.CurrySyntax.C_NewConstrDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> Curry.RunTimeSystem.nfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_NewConstrDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_NewConstrDecl x1 x2 x3 x4) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> Curry.RunTimeSystem.gnfCTC(\ v4 state4 -> f(Curry.Module.CurrySyntax.C_NewConstrDecl(v1)(v2)(v3)(v4))(state4))(x4)(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_NewConstrDeclOr(Curry.RunTimeSystem.mkRef(r)(4)(i))([Curry.Module.CurrySyntax.C_NewConstrDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((3::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(4)

  failed  = Curry.Module.CurrySyntax.C_NewConstrDeclFail

  branching  = Curry.Module.CurrySyntax.C_NewConstrDeclOr

  consKind (Curry.Module.CurrySyntax.C_NewConstrDeclOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_NewConstrDeclFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_NewConstrDeclFail x) = x

  orRef (Curry.Module.CurrySyntax.C_NewConstrDeclOr x _) = x

  branches (Curry.Module.CurrySyntax.C_NewConstrDeclOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_Infix where
  nf f x st = f(x)(st)

  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_InfixOr(Curry.RunTimeSystem.mkRef(r)(0)(i))([Curry.Module.CurrySyntax.C_InfixL,Curry.Module.CurrySyntax.C_InfixR,Curry.Module.CurrySyntax.C_Infix]))(0)

  failed  = Curry.Module.CurrySyntax.C_InfixFail

  branching  = Curry.Module.CurrySyntax.C_InfixOr

  consKind (Curry.Module.CurrySyntax.C_InfixOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_InfixFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_InfixFail x) = x

  orRef (Curry.Module.CurrySyntax.C_InfixOr x _) = x

  branches (Curry.Module.CurrySyntax.C_InfixOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_EvalAnnotation where
  nf f x st = f(x)(st)

  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_EvalAnnotationOr(Curry.RunTimeSystem.mkRef(r)(0)(i))([Curry.Module.CurrySyntax.C_EvalRigid,Curry.Module.CurrySyntax.C_EvalChoice]))(0)

  failed  = Curry.Module.CurrySyntax.C_EvalAnnotationFail

  branching  = Curry.Module.CurrySyntax.C_EvalAnnotationOr

  consKind (Curry.Module.CurrySyntax.C_EvalAnnotationOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_EvalAnnotationFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_EvalAnnotationFail x) = x

  orRef (Curry.Module.CurrySyntax.C_EvalAnnotationOr x _) = x

  branches (Curry.Module.CurrySyntax.C_EvalAnnotationOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_CallConv where
  nf f x st = f(x)(st)

  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_CallConvOr(Curry.RunTimeSystem.mkRef(r)(0)(i))([Curry.Module.CurrySyntax.C_CallConvPrimitive,Curry.Module.CurrySyntax.C_CallConvCCall]))(0)

  failed  = Curry.Module.CurrySyntax.C_CallConvFail

  branching  = Curry.Module.CurrySyntax.C_CallConvOr

  consKind (Curry.Module.CurrySyntax.C_CallConvOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_CallConvFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_CallConvFail x) = x

  orRef (Curry.Module.CurrySyntax.C_CallConvOr x _) = x

  branches (Curry.Module.CurrySyntax.C_CallConvOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_TypeExpr where
  nf f (Curry.Module.CurrySyntax.C_ConstructorType x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ConstructorType(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_VariableType x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_VariableType(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_TupleType x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_TupleType(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ListType x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ListType(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ArrowType x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ArrowType(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_RecordType x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RecordType(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_ConstructorType x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ConstructorType(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_VariableType x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_VariableType(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_TupleType x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_TupleType(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ListType x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ListType(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ArrowType x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ArrowType(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_RecordType x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RecordType(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_TypeExprOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_ConstructorType(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_VariableType(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_TupleType(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ListType(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ArrowType(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_RecordType(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_TypeExprFail

  branching  = Curry.Module.CurrySyntax.C_TypeExprOr

  consKind (Curry.Module.CurrySyntax.C_TypeExprOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_TypeExprFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_TypeExprFail x) = x

  orRef (Curry.Module.CurrySyntax.C_TypeExprOr x _) = x

  branches (Curry.Module.CurrySyntax.C_TypeExprOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_Equation t0) where
  nf f (Curry.Module.CurrySyntax.C_Equation x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Equation(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Equation x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Equation(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_EquationOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_Equation(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_EquationFail

  branching  = Curry.Module.CurrySyntax.C_EquationOr

  consKind (Curry.Module.CurrySyntax.C_EquationOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_EquationFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_EquationFail x) = x

  orRef (Curry.Module.CurrySyntax.C_EquationOr x _) = x

  branches (Curry.Module.CurrySyntax.C_EquationOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_Lhs t0) where
  nf f (Curry.Module.CurrySyntax.C_FunLhs x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_FunLhs(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_OpLhs x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_OpLhs(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ApLhs x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ApLhs(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_FunLhs x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_FunLhs(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_OpLhs x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_OpLhs(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ApLhs x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ApLhs(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_LhsOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_FunLhs(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_OpLhs(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ApLhs(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_LhsFail

  branching  = Curry.Module.CurrySyntax.C_LhsOr

  consKind (Curry.Module.CurrySyntax.C_LhsOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_LhsFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_LhsFail x) = x

  orRef (Curry.Module.CurrySyntax.C_LhsOr x _) = x

  branches (Curry.Module.CurrySyntax.C_LhsOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_Rhs t0) where
  nf f (Curry.Module.CurrySyntax.C_SimpleRhs x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_SimpleRhs(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_GuardedRhs x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_GuardedRhs(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_SimpleRhs x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_SimpleRhs(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_GuardedRhs x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_GuardedRhs(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_RhsOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_SimpleRhs(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_GuardedRhs(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_RhsFail

  branching  = Curry.Module.CurrySyntax.C_RhsOr

  consKind (Curry.Module.CurrySyntax.C_RhsOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_RhsFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_RhsFail x) = x

  orRef (Curry.Module.CurrySyntax.C_RhsOr x _) = x

  branches (Curry.Module.CurrySyntax.C_RhsOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_CondExpr t0) where
  nf f (Curry.Module.CurrySyntax.C_CondExpr x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_CondExpr(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_CondExpr x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_CondExpr(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_CondExprOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_CondExpr(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_CondExprFail

  branching  = Curry.Module.CurrySyntax.C_CondExprOr

  consKind (Curry.Module.CurrySyntax.C_CondExprOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_CondExprFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_CondExprFail x) = x

  orRef (Curry.Module.CurrySyntax.C_CondExprOr x _) = x

  branches (Curry.Module.CurrySyntax.C_CondExprOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_Literal where
  nf f (Curry.Module.CurrySyntax.C_Char x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Char(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Int x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Int(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Float x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Float(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_String x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_String(v1))(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Char x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Char(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Int x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Int(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Float x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Float(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_String x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_String(v1))(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_LiteralOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_Char(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Int(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Float(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_String(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_LiteralFail

  branching  = Curry.Module.CurrySyntax.C_LiteralOr

  consKind (Curry.Module.CurrySyntax.C_LiteralOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_LiteralFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_LiteralFail x) = x

  orRef (Curry.Module.CurrySyntax.C_LiteralOr x _) = x

  branches (Curry.Module.CurrySyntax.C_LiteralOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_ConstrTerm t0) where
  nf f (Curry.Module.CurrySyntax.C_LiteralPattern x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_LiteralPattern(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_NegativePattern x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_NegativePattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_VariablePattern x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_VariablePattern(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ConstructorPattern x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ConstructorPattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_InfixPattern x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_InfixPattern(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ParenPattern x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ParenPattern(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_TuplePattern x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_TuplePattern(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ListPattern x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ListPattern(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_AsPattern x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_AsPattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_LazyPattern x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_LazyPattern(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_FunctionPattern x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_FunctionPattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_InfixFuncPattern x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_InfixFuncPattern(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_RecordPattern x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RecordPattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_LiteralPattern x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_LiteralPattern(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_NegativePattern x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_NegativePattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_VariablePattern x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_VariablePattern(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ConstructorPattern x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ConstructorPattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_InfixPattern x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_InfixPattern(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ParenPattern x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ParenPattern(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_TuplePattern x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_TuplePattern(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ListPattern x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_ListPattern(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_AsPattern x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_AsPattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_LazyPattern x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_LazyPattern(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_FunctionPattern x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_FunctionPattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_InfixFuncPattern x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_InfixFuncPattern(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_RecordPattern x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RecordPattern(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_ConstrTermOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_LiteralPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_NegativePattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_VariablePattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ConstructorPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_InfixPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ParenPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_TuplePattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ListPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_AsPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_LazyPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_FunctionPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_InfixFuncPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_RecordPattern(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_ConstrTermFail

  branching  = Curry.Module.CurrySyntax.C_ConstrTermOr

  consKind (Curry.Module.CurrySyntax.C_ConstrTermOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_ConstrTermFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_ConstrTermFail x) = x

  orRef (Curry.Module.CurrySyntax.C_ConstrTermOr x _) = x

  branches (Curry.Module.CurrySyntax.C_ConstrTermOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_Expression t0) where
  nf f (Curry.Module.CurrySyntax.C_Literal x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Literal(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Variable x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Variable(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Constructor x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Constructor(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Paren x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Paren(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Typed x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Typed(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Tuple x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Tuple(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_List x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_List(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_ListCompr x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ListCompr(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_EnumFrom x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_EnumFrom(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_EnumFromThen x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_EnumFromThen(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_EnumFromTo x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_EnumFromTo(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_EnumFromThenTo x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_EnumFromThenTo(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_UnaryMinus x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_UnaryMinus(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Apply x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Apply(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_InfixApply x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_InfixApply(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_LeftSection x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_LeftSection(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_RightSection x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RightSection(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Lambda x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Lambda(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Let x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Let(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Do x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Do(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_IfThenElse x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_IfThenElse(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_Case x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Case(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_RecordConstr x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_RecordConstr(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_RecordSelection x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RecordSelection(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_RecordUpdate x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RecordUpdate(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Literal x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Literal(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Variable x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Variable(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Constructor x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Constructor(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Paren x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Paren(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Typed x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Typed(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Tuple x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_Tuple(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_List x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_List(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_ListCompr x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_ListCompr(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_EnumFrom x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_EnumFrom(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_EnumFromThen x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_EnumFromThen(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_EnumFromTo x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_EnumFromTo(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_EnumFromThenTo x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_EnumFromThenTo(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_UnaryMinus x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_UnaryMinus(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Apply x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Apply(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_InfixApply x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_InfixApply(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_LeftSection x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_LeftSection(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_RightSection x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RightSection(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Lambda x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Lambda(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Let x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Let(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Do x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Do(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_IfThenElse x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_IfThenElse(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_Case x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_Case(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_RecordConstr x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_RecordConstr(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_RecordSelection x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RecordSelection(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_RecordUpdate x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_RecordUpdate(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_ExpressionOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_Literal(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Variable(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Constructor(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Paren(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Typed(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Tuple(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_List(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_ListCompr(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_EnumFrom(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_EnumFromThen(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_EnumFromTo(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_EnumFromThenTo(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_UnaryMinus(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Apply(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_InfixApply(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_LeftSection(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_RightSection(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Lambda(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Let(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Do(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_IfThenElse(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_Case(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_RecordConstr(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_RecordSelection(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_RecordUpdate(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_ExpressionFail

  branching  = Curry.Module.CurrySyntax.C_ExpressionOr

  consKind (Curry.Module.CurrySyntax.C_ExpressionOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_ExpressionFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_ExpressionFail x) = x

  orRef (Curry.Module.CurrySyntax.C_ExpressionOr x _) = x

  branches (Curry.Module.CurrySyntax.C_ExpressionOr _ x) = x





instance BaseCurry Curry.Module.CurrySyntax.C_InfixOp where
  nf f (Curry.Module.CurrySyntax.C_InfixOp x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_InfixOp(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_InfixConstr x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_InfixConstr(v1))(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_InfixOp x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_InfixOp(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_InfixConstr x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_InfixConstr(v1))(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_InfixOpOr(Curry.RunTimeSystem.mkRef(r)(1)(i))([Curry.Module.CurrySyntax.C_InfixOp(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_InfixConstr(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(1)

  failed  = Curry.Module.CurrySyntax.C_InfixOpFail

  branching  = Curry.Module.CurrySyntax.C_InfixOpOr

  consKind (Curry.Module.CurrySyntax.C_InfixOpOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_InfixOpFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_InfixOpFail x) = x

  orRef (Curry.Module.CurrySyntax.C_InfixOpOr x _) = x

  branches (Curry.Module.CurrySyntax.C_InfixOpOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_Statement t0) where
  nf f (Curry.Module.CurrySyntax.C_StmtExpr x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_StmtExpr(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_StmtDecl x1) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_StmtDecl(v1))(state1))(x1)(state0)
  nf f (Curry.Module.CurrySyntax.C_StmtBind x1 x2) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_StmtBind(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_StmtExpr x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_StmtExpr(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_StmtDecl x1) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> f(Curry.Module.CurrySyntax.C_StmtDecl(v1))(state1))(x1)(state0)
  gnf f (Curry.Module.CurrySyntax.C_StmtBind x1 x2) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> f(Curry.Module.CurrySyntax.C_StmtBind(v1)(v2))(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_StatementOr(Curry.RunTimeSystem.mkRef(r)(2)(i))([Curry.Module.CurrySyntax.C_StmtExpr(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_StmtDecl(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int)))),Curry.Module.CurrySyntax.C_StmtBind(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(2)

  failed  = Curry.Module.CurrySyntax.C_StatementFail

  branching  = Curry.Module.CurrySyntax.C_StatementOr

  consKind (Curry.Module.CurrySyntax.C_StatementOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_StatementFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_StatementFail x) = x

  orRef (Curry.Module.CurrySyntax.C_StatementOr x _) = x

  branches (Curry.Module.CurrySyntax.C_StatementOr _ x) = x





instance (BaseCurry t0) => BaseCurry (Curry.Module.CurrySyntax.C_Alt t0) where
  nf f (Curry.Module.CurrySyntax.C_Alt x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Alt(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Alt x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Alt(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_AltOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_Alt(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_AltFail

  branching  = Curry.Module.CurrySyntax.C_AltOr

  consKind (Curry.Module.CurrySyntax.C_AltOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_AltFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_AltFail x) = x

  orRef (Curry.Module.CurrySyntax.C_AltOr x _) = x

  branches (Curry.Module.CurrySyntax.C_AltOr _ x) = x





instance (BaseCurry t0,BaseCurry t1) => BaseCurry (Curry.Module.CurrySyntax.C_Field t0 t1) where
  nf f (Curry.Module.CurrySyntax.C_Field x1 x2 x3) state0 = Curry.RunTimeSystem.nfCTC(\ v1 state1 -> Curry.RunTimeSystem.nfCTC(\ v2 state2 -> Curry.RunTimeSystem.nfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Field(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  nf f x st = f(x)(st)

  gnf f (Curry.Module.CurrySyntax.C_Field x1 x2 x3) state0 = Curry.RunTimeSystem.gnfCTC(\ v1 state1 -> Curry.RunTimeSystem.gnfCTC(\ v2 state2 -> Curry.RunTimeSystem.gnfCTC(\ v3 state3 -> f(Curry.Module.CurrySyntax.C_Field(v1)(v2)(v3))(state3))(x3)(state2))(x2)(state1))(x1)(state0)
  gnf f x st = f(x)(st)

  generator i = Curry.RunTimeSystem.withRef(\ r -> Curry.Module.CurrySyntax.C_FieldOr(Curry.RunTimeSystem.mkRef(r)(3)(i))([Curry.Module.CurrySyntax.C_Field(Curry.RunTimeSystem.generator((Prelude.+)(r)((2::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((1::Int))))(Curry.RunTimeSystem.generator((Prelude.+)(r)((0::Int))))]))(3)

  failed  = Curry.Module.CurrySyntax.C_FieldFail

  branching  = Curry.Module.CurrySyntax.C_FieldOr

  consKind (Curry.Module.CurrySyntax.C_FieldOr _ _) = Curry.RunTimeSystem.Branching
  consKind (Curry.Module.CurrySyntax.C_FieldFail _) = Curry.RunTimeSystem.Failed
  consKind _ = Curry.RunTimeSystem.Val

  exceptions (Curry.Module.CurrySyntax.C_FieldFail x) = x

  orRef (Curry.Module.CurrySyntax.C_FieldOr x _) = x

  branches (Curry.Module.CurrySyntax.C_FieldOr _ x) = x





instance Curry Curry.Module.CurrySyntax.C_Position where
  strEq (Curry.Module.CurrySyntax.C_Position x1 x2 x3) (Curry.Module.CurrySyntax.C_Position y1 y2 y3) st = Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x1)(y1)(st))(Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x2)(y2)(st))(Curry.Module.Prelude.genStrEq(x3)(y3)(st))(st))(st)
  strEq _ x0 _ = Curry.Module.Prelude.strEqFail(Curry.Module.Prelude.typeName(x0))

  eq (Curry.Module.CurrySyntax.C_Position x1 x2 x3) (Curry.Module.CurrySyntax.C_Position y1 y2 y3) st = Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x1)(y1)(st))(Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x2)(y2)(st))(Curry.Module.Prelude.genEq(x3)(y3)(st))(st))(st)
  eq _ _ _ = Curry.Module.Prelude.C_False

  propagate f (Curry.Module.CurrySyntax.C_Position x1 x2 x3) st = Curry.Module.CurrySyntax.C_Position(f((0::Int))(x1)(st))(f((1::Int))(x2)(st))(f((2::Int))(x3)(st))

  foldCurry f c (Curry.Module.CurrySyntax.C_Position x1 x2 x3) st = f(x1)(f(x2)(f(x3)(c)(st))(st))(st)

  typeName _ = "Position"

  showQ d (Curry.Module.CurrySyntax.C_Position x1 x2 x3) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.Position "))((Prelude..)(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))((Prelude..)(Prelude.showChar(' '))((Prelude..)(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x2))((Prelude..)(Prelude.showChar(' '))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x3))))))


  showQ _ (Curry.Module.CurrySyntax.C_PositionOr r _) = Prelude.showString((:)('_')(Prelude.show(Curry.RunTimeSystem.deref(r))))





instance Curry Curry.Module.CurrySyntax.C_Ident where
  strEq (Curry.Module.CurrySyntax.C_Ident x1 x2) (Curry.Module.CurrySyntax.C_Ident y1 y2) st = Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x1)(y1)(st))(Curry.Module.Prelude.genStrEq(x2)(y2)(st))(st)
  strEq _ x0 _ = Curry.Module.Prelude.strEqFail(Curry.Module.Prelude.typeName(x0))

  eq (Curry.Module.CurrySyntax.C_Ident x1 x2) (Curry.Module.CurrySyntax.C_Ident y1 y2) st = Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x1)(y1)(st))(Curry.Module.Prelude.genEq(x2)(y2)(st))(st)
  eq _ _ _ = Curry.Module.Prelude.C_False

  propagate f (Curry.Module.CurrySyntax.C_Ident x1 x2) st = Curry.Module.CurrySyntax.C_Ident(f((0::Int))(x1)(st))(f((1::Int))(x2)(st))

  foldCurry f c (Curry.Module.CurrySyntax.C_Ident x1 x2) st = f(x1)(f(x2)(c)(st))(st)

  typeName _ = "Ident"

  showQ d (Curry.Module.CurrySyntax.C_Ident x1 x2) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.Ident "))((Prelude..)(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))((Prelude..)(Prelude.showChar(' '))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x2))))


  showQ _ (Curry.Module.CurrySyntax.C_IdentOr r _) = Prelude.showString((:)('_')(Prelude.show(Curry.RunTimeSystem.deref(r))))





instance Curry Curry.Module.CurrySyntax.C_QualIdent where
  strEq (Curry.Module.CurrySyntax.C_UnqualIdent x1) (Curry.Module.CurrySyntax.C_UnqualIdent y1) st = Curry.Module.Prelude.genStrEq(x1)(y1)(st)
  strEq (Curry.Module.CurrySyntax.C_QualIdent x1 x2) (Curry.Module.CurrySyntax.C_QualIdent y1 y2) st = Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x1)(y1)(st))(Curry.Module.Prelude.genStrEq(x2)(y2)(st))(st)
  strEq _ x0 _ = Curry.Module.Prelude.strEqFail(Curry.Module.Prelude.typeName(x0))

  eq (Curry.Module.CurrySyntax.C_UnqualIdent x1) (Curry.Module.CurrySyntax.C_UnqualIdent y1) st = Curry.Module.Prelude.genEq(x1)(y1)(st)
  eq (Curry.Module.CurrySyntax.C_QualIdent x1 x2) (Curry.Module.CurrySyntax.C_QualIdent y1 y2) st = Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x1)(y1)(st))(Curry.Module.Prelude.genEq(x2)(y2)(st))(st)
  eq _ _ _ = Curry.Module.Prelude.C_False

  propagate f (Curry.Module.CurrySyntax.C_UnqualIdent x1) st = Curry.Module.CurrySyntax.C_UnqualIdent(f((0::Int))(x1)(st))
  propagate f (Curry.Module.CurrySyntax.C_QualIdent x1 x2) st = Curry.Module.CurrySyntax.C_QualIdent(f((0::Int))(x1)(st))(f((1::Int))(x2)(st))

  foldCurry f c (Curry.Module.CurrySyntax.C_UnqualIdent x1) st = f(x1)(c)(st)
  foldCurry f c (Curry.Module.CurrySyntax.C_QualIdent x1 x2) st = f(x1)(f(x2)(c)(st))(st)

  typeName _ = "QualIdent"

  showQ d (Curry.Module.CurrySyntax.C_UnqualIdent x1) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.UnqualIdent "))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))


  showQ d (Curry.Module.CurrySyntax.C_QualIdent x1 x2) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.QualIdent "))((Prelude..)(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))((Prelude..)(Prelude.showChar(' '))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x2))))


  showQ _ (Curry.Module.CurrySyntax.C_QualIdentOr r _) = Prelude.showString((:)('_')(Prelude.show(Curry.RunTimeSystem.deref(r))))





instance (Curry t0) => Curry (Curry.Module.CurrySyntax.C_Module t0) where
  strEq (Curry.Module.CurrySyntax.C_Module x1 x2 x3) (Curry.Module.CurrySyntax.C_Module y1 y2 y3) st = Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x1)(y1)(st))(Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x2)(y2)(st))(Curry.Module.Prelude.genStrEq(x3)(y3)(st))(st))(st)
  strEq _ x0 _ = Curry.Module.Prelude.strEqFail(Curry.Module.Prelude.typeName(x0))

  eq (Curry.Module.CurrySyntax.C_Module x1 x2 x3) (Curry.Module.CurrySyntax.C_Module y1 y2 y3) st = Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x1)(y1)(st))(Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x2)(y2)(st))(Curry.Module.Prelude.genEq(x3)(y3)(st))(st))(st)
  eq _ _ _ = Curry.Module.Prelude.C_False

  propagate f (Curry.Module.CurrySyntax.C_Module x1 x2 x3) st = Curry.Module.CurrySyntax.C_Module(f((0::Int))(x1)(st))(f((1::Int))(x2)(st))(f((2::Int))(x3)(st))

  foldCurry f c (Curry.Module.CurrySyntax.C_Module x1 x2 x3) st = f(x1)(f(x2)(f(x3)(c)(st))(st))(st)

  typeName _ = "Module"

  showQ d (Curry.Module.CurrySyntax.C_Module x1 x2 x3) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.Module "))((Prelude..)(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))((Prelude..)(Prelude.showChar(' '))((Prelude..)(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x2))((Prelude..)(Prelude.showChar(' '))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x3))))))


  showQ _ (Curry.Module.CurrySyntax.C_ModuleOr r _) = Prelude.showString((:)('_')(Prelude.show(Curry.RunTimeSystem.deref(r))))





instance (Curry t0) => Curry (Curry.Module.CurrySyntax.C_ExportSpec t0) where
  strEq (Curry.Module.CurrySyntax.C_Exporting x1 x2) (Curry.Module.CurrySyntax.C_Exporting y1 y2) st = Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x1)(y1)(st))(Curry.Module.Prelude.genStrEq(x2)(y2)(st))(st)
  strEq _ x0 _ = Curry.Module.Prelude.strEqFail(Curry.Module.Prelude.typeName(x0))

  eq (Curry.Module.CurrySyntax.C_Exporting x1 x2) (Curry.Module.CurrySyntax.C_Exporting y1 y2) st = Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x1)(y1)(st))(Curry.Module.Prelude.genEq(x2)(y2)(st))(st)
  eq _ _ _ = Curry.Module.Prelude.C_False

  propagate f (Curry.Module.CurrySyntax.C_Exporting x1 x2) st = Curry.Module.CurrySyntax.C_Exporting(f((0::Int))(x1)(st))(f((1::Int))(x2)(st))

  foldCurry f c (Curry.Module.CurrySyntax.C_Exporting x1 x2) st = f(x1)(f(x2)(c)(st))(st)

  typeName _ = "ExportSpec"

  showQ d (Curry.Module.CurrySyntax.C_Exporting x1 x2) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.Exporting "))((Prelude..)(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))((Prelude..)(Prelude.showChar(' '))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x2))))


  showQ _ (Curry.Module.CurrySyntax.C_ExportSpecOr r _) = Prelude.showString((:)('_')(Prelude.show(Curry.RunTimeSystem.deref(r))))





instance Curry Curry.Module.CurrySyntax.C_Export where
  strEq (Curry.Module.CurrySyntax.C_Export x1) (Curry.Module.CurrySyntax.C_Export y1) st = Curry.Module.Prelude.genStrEq(x1)(y1)(st)
  strEq (Curry.Module.CurrySyntax.C_ExportTypeWith x1 x2) (Curry.Module.CurrySyntax.C_ExportTypeWith y1 y2) st = Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x1)(y1)(st))(Curry.Module.Prelude.genStrEq(x2)(y2)(st))(st)
  strEq (Curry.Module.CurrySyntax.C_ExportTypeAll x1) (Curry.Module.CurrySyntax.C_ExportTypeAll y1) st = Curry.Module.Prelude.genStrEq(x1)(y1)(st)
  strEq (Curry.Module.CurrySyntax.C_ExportModule x1) (Curry.Module.CurrySyntax.C_ExportModule y1) st = Curry.Module.Prelude.genStrEq(x1)(y1)(st)
  strEq _ x0 _ = Curry.Module.Prelude.strEqFail(Curry.Module.Prelude.typeName(x0))

  eq (Curry.Module.CurrySyntax.C_Export x1) (Curry.Module.CurrySyntax.C_Export y1) st = Curry.Module.Prelude.genEq(x1)(y1)(st)
  eq (Curry.Module.CurrySyntax.C_ExportTypeWith x1 x2) (Curry.Module.CurrySyntax.C_ExportTypeWith y1 y2) st = Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x1)(y1)(st))(Curry.Module.Prelude.genEq(x2)(y2)(st))(st)
  eq (Curry.Module.CurrySyntax.C_ExportTypeAll x1) (Curry.Module.CurrySyntax.C_ExportTypeAll y1) st = Curry.Module.Prelude.genEq(x1)(y1)(st)
  eq (Curry.Module.CurrySyntax.C_ExportModule x1) (Curry.Module.CurrySyntax.C_ExportModule y1) st = Curry.Module.Prelude.genEq(x1)(y1)(st)
  eq _ _ _ = Curry.Module.Prelude.C_False

  propagate f (Curry.Module.CurrySyntax.C_Export x1) st = Curry.Module.CurrySyntax.C_Export(f((0::Int))(x1)(st))
  propagate f (Curry.Module.CurrySyntax.C_ExportTypeWith x1 x2) st = Curry.Module.CurrySyntax.C_ExportTypeWith(f((0::Int))(x1)(st))(f((1::Int))(x2)(st))
  propagate f (Curry.Module.CurrySyntax.C_ExportTypeAll x1) st = Curry.Module.CurrySyntax.C_ExportTypeAll(f((0::Int))(x1)(st))
  propagate f (Curry.Module.CurrySyntax.C_ExportModule x1) st = Curry.Module.CurrySyntax.C_ExportModule(f((0::Int))(x1)(st))

  foldCurry f c (Curry.Module.CurrySyntax.C_Export x1) st = f(x1)(c)(st)
  foldCurry f c (Curry.Module.CurrySyntax.C_ExportTypeWith x1 x2) st = f(x1)(f(x2)(c)(st))(st)
  foldCurry f c (Curry.Module.CurrySyntax.C_ExportTypeAll x1) st = f(x1)(c)(st)
  foldCurry f c (Curry.Module.CurrySyntax.C_ExportModule x1) st = f(x1)(c)(st)

  typeName _ = "Export"

  showQ d (Curry.Module.CurrySyntax.C_Export x1) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.Export "))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))


  showQ d (Curry.Module.CurrySyntax.C_ExportTypeWith x1 x2) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.ExportTypeWith "))((Prelude..)(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))((Prelude..)(Prelude.showChar(' '))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x2))))


  showQ d (Curry.Module.CurrySyntax.C_ExportTypeAll x1) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.ExportTypeAll "))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))


  showQ d (Curry.Module.CurrySyntax.C_ExportModule x1) = Prelude.showParen(Prelude.True)(showStr)
   where
    showStr  = (Prelude..)(Prelude.showString("CurrySyntax.ExportModule "))(Curry.Module.Prelude.showQ(Curry.RunTimeSystem.eleven)(x1))


  showQ _ (Curry.Module.CurrySyntax.C_ExportOr r _) = Prelude.showString((:)('_')(Prelude.show(Curry.RunTimeSystem.deref(r))))





instance (Curry t0) => Curry (Curry.Module.CurrySyntax.C_ImportSpec t0) where
  strEq (Curry.Module.CurrySyntax.C_Importing x1 x2) (Curry.Module.CurrySyntax.C_Importing y1 y2) st = Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x1)(y1)(st))(Curry.Module.Prelude.genStrEq(x2)(y2)(st))(st)
  strEq (Curry.Module.CurrySyntax.C_Hiding x1 x2) (Curry.Module.CurrySyntax.C_Hiding y1 y2) st = Curry.Module.Prelude.concAnd(Curry.Module.Prelude.genStrEq(x1)(y1)(st))(Curry.Module.Prelude.genStrEq(x2)(y2)(st))(st)
  strEq _ x0 _ = Curry.Module.Prelude.strEqFail(Curry.Module.Prelude.typeName(x0))

  eq (Curry.Module.CurrySyntax.C_Importing x1 x2) (Curry.Module.CurrySyntax.C_Importing y1 y2) st = Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x1)(y1)(st))(Curry.Module.Prelude.genEq(x2)(y2)(st))(st)
  eq (Curry.Module.CurrySyntax.C_Hiding x1 x2) (Curry.Module.CurrySyntax.C_Hiding y1 y2) st = Curry.Module.Prelude.op_38_38(Curry.Module.Prelude.genEq(x1)(y1)(st))(Curry.Module.Prelude.genEq(x2)(y2)(st))(st)
  eq _ _ _ = Curry.Module.Prelude.C_False

  propagate f (Curry.Module.CurrySyntax.C_Importing x1 x2) st = Curry.Module.CurrySyntax.C_Importing(f((0::Int))(x1)(st))(f((1::Int))