sig
  type celement_test =
      CSchemaElementTest of Xquery_common_ast.cename
    | CElementTest of
        (Xquery_common_ast.cename * Xquery_common_ast.ctname option) option
  type cattribute_test =
      CSchemaAttributeTest of Xquery_common_ast.caname
    | CAttributeTest of
        (Xquery_common_ast.caname * Xquery_common_ast.ctname option) option
  type ckind_test =
      CDocumentKind of Xquery_core_ast.celement_test option
    | CElementKind of Xquery_core_ast.celement_test
    | CAttributeKind of Xquery_core_ast.cattribute_test
    | CPIKind of string option
    | CCommentKind
    | CTextKind
    | CAnyKind
  type citemtype =
      CITKindTest of Xquery_core_ast.ckind_test
    | CITTypeRef of Xquery_common_ast.ctname
    | CITItem
    | CITNumeric
    | CITAnyString
    | CITAtomic of Xquery_common_ast.ctname
    | CITEmpty
  type csequencetype_desc =
      Xquery_core_ast.citemtype * Occurrence.occurrence_indicator option
  type csequencetype = {
    pcsequencetype_desc : Xquery_core_ast.csequencetype_desc;
    pcsequencetype_loc : Finfo.finfo;
  }
  type cfunction_signature =
      (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype) list *
      (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype)
  type cpattern = {
    pcpattern_desc : Xquery_core_ast.cpattern_desc;
    pcpattern_loc : Finfo.finfo;
  }
  and cpattern_desc =
      CCase of (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype)
    | CDefault
  type cnode_test =
      CPNameTest of Namespace_names.rqname
    | CPNodeKindTest of
        (Xquery_core_ast.ckind_test * Xquery_type_core_ast.cxtype)
  type overloaded_signature_table =
      (Xquery_common_ast.cfname * Xquery_core_ast.cfunction_signature *
       Xquery_core_ast.acfunction_body_kind *
       Xquery_common_ast.updating_modifier)
      list
  and acexpr = {
    pcexpr_desc : Xquery_core_ast.acexpr_desc;
    pcexpr_annot : Xquery_core_ast_annotation.ast_annot;
    mutable pcexpr_origin : Xquery_ast.expr_handle;
    pcexpr_loc : Finfo.finfo;
  }
  and acinsert_location =
      CUAsLastInto of Xquery_core_ast.acexpr
    | CUAsFirstInto of Xquery_core_ast.acexpr
    | CUInto of Xquery_core_ast.acexpr
    | CUAfter of Xquery_core_ast.acexpr
    | CUBefore of Xquery_core_ast.acexpr
  and acexpr_desc =
      CEUnordered of Xquery_core_ast.acexpr
    | CEOrdered of Xquery_core_ast.acexpr
    | CEFLWOR of Xquery_core_ast.acfl_expr list *
        Xquery_core_ast.acexpr option * Xquery_core_ast.acorder_by option *
        Xquery_core_ast.acexpr
    | CEIf of Xquery_core_ast.acexpr * Xquery_core_ast.acexpr *
        Xquery_core_ast.acexpr
    | CETypeswitch of Xquery_core_ast.acexpr *
        (Xquery_core_ast.cpattern * Xquery_common_ast.cvname option *
         Xquery_core_ast.acexpr)
        list
    | CEVar of Xquery_common_ast.cvname
    | CECall of Xquery_common_ast.cfname * Xquery_core_ast.acexpr list *
        ((Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype) option
         list * (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype)) *
        Xquery_common_ast.updating_modifier * bool
    | CEOverloadedCall of Xquery_common_ast.cfname *
        Xquery_core_ast.acexpr list *
        Xquery_core_ast.overloaded_signature_table
    | CEScalar of Xquery_common_ast.literal
    | CESeq of Xquery_core_ast.acexpr * Xquery_core_ast.acexpr
    | CEEmpty
    | CEDocument of Xquery_core_ast.acexpr
    | CEPI of Namespace_names.ncname * string
    | CEPIComputed of Xquery_core_ast.acexpr * Xquery_core_ast.acexpr
    | CEComment of string
    | CECommentComputed of Xquery_core_ast.acexpr
    | CEText of string
    | CECharRef of int
    | CETextComputed of Xquery_core_ast.acexpr
    | CEElem of Xquery_common_ast.cename * Namespace_context.nsenv *
        Xquery_core_ast.acexpr list
    | CEAnyElem of Xquery_core_ast.acexpr * Namespace_context.nsenv *
        Namespace_context.nsenv * Xquery_core_ast.acexpr
    | CEAttr of Xquery_common_ast.caname * Xquery_core_ast.acexpr list
    | CEAnyAttr of Xquery_core_ast.acexpr * Namespace_context.nsenv *
        Xquery_core_ast.acexpr
    | CEError of Xquery_core_ast.acexpr list
    | CETreat of Xquery_core_ast.acexpr *
        (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype)
    | CEValidate of
        (Xquery_common_ast.validation_mode * Xquery_core_ast.acexpr)
    | CECast of Xquery_core_ast.acexpr * Namespace_context.nsenv *
        (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype)
    | CECastable of Xquery_core_ast.acexpr * Namespace_context.nsenv *
        (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype)
    | CEForwardAxis of Xquery_common_ast.cvname * Xquery_common_ast.axis *
        Xquery_core_ast.cnode_test
    | CEReverseAxis of Xquery_common_ast.cvname * Xquery_common_ast.axis *
        Xquery_core_ast.cnode_test
    | CESome of
        (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype) option *
        Xquery_common_ast.cvname * Xquery_core_ast.acexpr *
        Xquery_core_ast.acexpr
    | CEEvery of
        (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype) option *
        Xquery_common_ast.cvname * Xquery_core_ast.acexpr *
        Xquery_core_ast.acexpr
    | CELetServerImplement of Namespace_names.ncname * string *
        Xquery_core_ast.acexpr * Xquery_core_ast.acexpr
    | CEExecute of bool * Namespace_names.ncname * string *
        Xquery_core_ast.acexpr * Xquery_core_ast.acexpr
    | CEForServerClose of Namespace_names.ncname * string *
        Xquery_core_ast.acexpr
    | CEEvalClosure of Xquery_core_ast.acexpr
    | CECopy of Xquery_core_ast.acexpr
    | CEDelete of Xquery_core_ast.acexpr
    | CEInsert of Xquery_core_ast.acexpr * Xquery_core_ast.acinsert_location
    | CERename of Namespace_context.nsenv * Xquery_core_ast.acexpr *
        Xquery_core_ast.acexpr
    | CEReplace of Xquery_common_ast.value_of_flag * Xquery_core_ast.acexpr *
        Xquery_core_ast.acexpr
    | CESnap of Xquery_common_ast.snap_modifier * Xquery_core_ast.acexpr
    | CEProtoValue of Datatypes.atomic_type
    | CELetvar of
        (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype) option *
        Xquery_common_ast.cvname * Xquery_core_ast.acexpr *
        Xquery_core_ast.acexpr
    | CESet of Xquery_common_ast.cvname * Xquery_core_ast.acexpr
    | CEImperativeSeq of Xquery_core_ast.acexpr * Xquery_core_ast.acexpr
    | CEWhile of Xquery_core_ast.acexpr * Xquery_core_ast.acexpr
  and acfl_expr =
      CELET of
        (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype) option *
        Xquery_common_ast.cvname * Xquery_core_ast.acexpr
    | CEFOR of
        (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype) option *
        Xquery_common_ast.cvname * Xquery_common_ast.cvname option *
        Xquery_core_ast.acexpr
  and acorder_by =
      Xquery_common_ast.stablekind * Xquery_core_ast.acorder_spec list *
      Xquery_core_ast.overloaded_signature_table
  and acorder_spec =
      Xquery_core_ast.acexpr * Xquery_common_ast.sortkind *
      Xquery_common_ast.emptysortkind
  and acfunction_body =
      CEFunctionBltIn
    | CEFunctionInterface
    | CEFunctionImported
    | CEFunctionUser of Xquery_core_ast.acexpr
  and acfunction_body_kind =
      CEFunctionBltInKind
    | CEFunctionInterfaceKind
    | CEFunctionImportedKind
    | CEFunctionUserKind
  type acfunction_def = {
    pcfunction_def_desc : Xquery_core_ast.acfunction_def_desc;
    pcfunction_def_loc : Finfo.finfo;
  }
  and acfunction_def_desc =
      (Xquery_common_ast.cfname * int) * Xquery_common_ast.cvname list *
      Xquery_core_ast.cfunction_signature * Xquery_core_ast.acfunction_body *
      Xquery_common_ast.updating_modifier
  type acvar_body =
      CEVarExternal
    | CEVarInterface
    | CEVarImported
    | CEVarUser of Xquery_core_ast.acexpr
  type acvar_decl = {
    pcvar_decl_desc : Xquery_core_ast.acvar_decl_desc;
    pcvar_decl_loc : Finfo.finfo;
  }
  and acvar_decl_desc =
      Xquery_common_ast.cvname *
      (Xquery_core_ast.csequencetype * Xquery_type_core_ast.cxtype) option *
      Xquery_core_ast.acvar_body
  type acserver_decl = {
    pcserver_decl_desc : Xquery_core_ast.acserver_decl_desc;
    pcserver_decl_loc : Finfo.finfo;
  }
  and acserver_decl_desc =
      Namespace_names.ncname * string * Xquery_core_ast.acexpr
  type acindex_def = {
    pcindex_def_desc : Xquery_core_ast.acindex_def_desc;
    pcindex_def_loc : Finfo.finfo;
  }
  and acindex_def_desc =
      CValueIndex of string * Xquery_core_ast.acexpr * Xquery_core_ast.acexpr
    | CNameIndex of Xquery_common_ast.cename
  type acstatement = Xquery_core_ast.acexpr
  type acprolog = {
    pcprolog_functions : Xquery_core_ast.acfunction_def list;
    pcprolog_vars : Xquery_core_ast.acvar_decl list;
    pcprolog_servers : Xquery_core_ast.acserver_decl list;
    pcprolog_indices : Xquery_core_ast.acindex_def list;
  }
  type acxmodule = {
    pcmodule_prolog : Xquery_core_ast.acprolog;
    pcmodule_statements : Xquery_core_ast.acstatement list;
  }
  type acinterface = Xquery_core_ast.acprolog
end