sig
  type csubstitutes_for =
      CSubstitutesFor of Namespace_symbols.relem_symbol
    | CNonSubstitutesFor
  type cxtype = {
    mutable pcxtype_desc : Xquery_type_core_ast.cxtype_desc;
    mutable pcxtype_simplified : bool;
    pcxtype_loc : Finfo.finfo;
  }
  and cxtype_desc =
      CAtomicRef of Namespace_symbols.rtype_symbol
    | CElementRef of Namespace_symbols.relem_symbol
    | CAttributeRef of Namespace_symbols.rattr_symbol
    | CElementLocal of Namespace_symbols.relem_symbol *
        Xquery_common_ast.nillable * Namespace_symbols.rtype_symbol
    | CAttributeLocal of Namespace_symbols.rattr_symbol *
        Namespace_symbols.rtype_symbol
    | CDocument of Xquery_type_core_ast.cxtype
    | CText
    | CPI of string option
    | CComment
    | CBound of Xquery_type_core_ast.cxtype * Occurrence.occurs *
        Occurrence.occurs
    | CSequence of Xquery_type_core_ast.cxtype * Xquery_type_core_ast.cxtype
    | CEmpty
    | CChoice of Xquery_type_core_ast.cxtype * Xquery_type_core_ast.cxtype
    | CNone
    | CInterleave of Xquery_type_core_ast.cxtype *
        Xquery_type_core_ast.cxtype
  and cxtype_derivation =
      Namespace_symbols.rtype_symbol *
      Xquery_type_core_ast.cattribute_content *
      Xquery_type_core_ast.cchildren_content
  and celem_derivation =
      Xquery_type_core_ast.csubstitutes_for * Xquery_common_ast.nillable *
      Namespace_symbols.rtype_symbol
  and cattr_derivation = Namespace_symbols.rtype_symbol
  and cattribute_content = Xquery_type_core_ast.cxtype option
  and cchildren_content =
      CComplexTypeRestriction of Xquery_common_ast.mixed *
        Xquery_type_core_ast.cxtype
    | CComplexTypeExtension of Xquery_common_ast.mixed *
        Xquery_type_core_ast.cxtype
    | CAtomicTypeRestriction
    | CSimpleTypeList of Namespace_symbols.rtype_symbol
    | CSimpleTypeUnion of Namespace_symbols.rtype_symbol list
  type celem_declaration =
      Namespace_symbols.relem_symbol * Xquery_type_core_ast.celem_derivation
  type cattr_declaration =
      Namespace_symbols.rattr_symbol * Xquery_type_core_ast.cattr_derivation
  type ctype_declaration = {
    ctypedecl_name : Namespace_symbols.rtype_symbol;
    ctypedecl_deriv : Xquery_type_core_ast.cxtype_derivation;
    mutable ctypedecl_cxtype : Xquery_type_core_ast.cxtype option;
  }
  type cxschema = {
    cxschema_letter_mappings :
      Xquery_type_core_ast_annotation.letter_mappings;
    cxschema_element_declarations :
      Xquery_type_core_ast.celem_declaration
      Namespace_symbols_util.SQNameHashtbl.t;
    cxschema_attribute_declarations :
      Xquery_type_core_ast.cattr_declaration
      Namespace_symbols_util.SQNameHashtbl.t;
    cxschema_type_declarations :
      Xquery_type_core_ast.ctype_declaration
      Namespace_symbols_util.SQNameHashtbl.t;
  }
end