sig
  type partial_order_result_t = [ `Equal | `Greater | `Incomparable | `Less ]
  type version_data_t = {
    version_string : string;
    build_time_float : float;
    build_time : string;
    buildno : int;
  }
  type dir_t =
      DIR_open of Flx_ast.qualified_name_t
    | DIR_inject_module of Flx_ast.qualified_name_t
    | DIR_use of Flx_ast.id_t * Flx_ast.qualified_name_t
  type dcl_t =
      [ `DCL_abs of
          Flx_ast.type_qual_t list * Flx_ast.c_t * Flx_ast.named_reqs_t
      | `DCL_cclass of Flx_ast.class_member_t list
      | `DCL_const of Flx_ast.typecode_t * Flx_ast.c_t * Flx_ast.named_reqs_t
      | `DCL_cstruct of (Flx_ast.id_t * Flx_ast.typecode_t) list
      | `DCL_fun of
          Flx_ast.property_t list * Flx_ast.typecode_t list *
          Flx_ast.typecode_t * Flx_ast.c_t * Flx_ast.named_reqs_t *
          Flx_ast.prec_t
      | `DCL_function of
          Flx_ast.params_t * Flx_ast.typecode_t * Flx_ast.property_t list *
          Flx_types.asm_t list
      | `DCL_glr of
          Flx_ast.typecode_t *
          (Flx_ast.reduced_production_t * Flx_ast.expr_t)
      | `DCL_inherit of Flx_ast.qualified_name_t
      | `DCL_inherit_fun of Flx_ast.qualified_name_t
      | `DCL_insert of Flx_ast.c_t * Flx_ast.ikind_t * Flx_ast.named_reqs_t
      | `DCL_match_check of Flx_ast.pattern_t * (string * int)
      | `DCL_match_handler of
          Flx_ast.pattern_t * (string * int) * Flx_types.asm_t list
      | `DCL_module of Flx_types.asm_t list
      | `DCL_regdef of Flx_ast.regexp_t
      | `DCL_reglex of (Flx_ast.regexp_t * Flx_ast.expr_t) list
      | `DCL_regmatch of (Flx_ast.regexp_t * Flx_ast.expr_t) list
      | `DCL_struct of (Flx_ast.id_t * Flx_ast.typecode_t) list
      | `DCL_type_alias of Flx_ast.typecode_t
      | `DCL_union of (Flx_ast.id_t * Flx_ast.typecode_t) list
      | `DCL_val of Flx_ast.typecode_t
      | `DCL_var of Flx_ast.typecode_t ]
  and access_t = [ `Private | `Public ]
  and asm_t =
      Exe of Flx_ast.range_srcref * Flx_ast.exe_t
    | Dcl of Flx_ast.range_srcref * Flx_ast.id_t * int option *
        Flx_types.access_t * Flx_ast.vs_list_t * Flx_types.dcl_t
    | Iface of Flx_ast.range_srcref * Flx_types.iface_t
    | Dir of Flx_ast.range_srcref * Flx_types.dir_t
  and entry_kind_t = int
  and entry_set_t =
      FunctionEntry of Flx_types.entry_kind_t list
    | NonFunctionEntry of Flx_types.entry_kind_t
  and module_rep_t =
      Simple_module of Flx_ast.bid_t * Flx_ast.typecode_t list *
        Flx_types.name_map_t * Flx_types.dir_t list
  and name_map_t = (string, Flx_types.entry_set_t) Hashtbl.t
  and iface_t =
      [ `IFACE_export_fun of Flx_ast.suffixed_name_t * string
      | `IFACE_export_type of Flx_ast.typecode_t * string ]
  type 'a b0typecode_t' =
      [ `BTYP_array of 'a * 'a
      | `BTYP_fix of int
      | `BTYP_function of 'a * 'a
      | `BTYP_inst of Flx_ast.bid_t * 'a list
      | `BTYP_intersect of 'a list
      | `BTYP_lvalue of 'a
      | `BTYP_pointer of 'a
      | `BTYP_sum of 'a list
      | `BTYP_tuple of 'a list
      | `BTYP_unitsum of int
      | `BTYP_void ]
  type 'a btpattern_t' = {
    pattern : 'a;
    pattern_vars : Flx_mtypes1.IntSet.t;
    assignments : (int * 'a) list;
  }
  type 'a b1typecode_t' =
      [ `BTYP_apply of 'a * 'a
      | `BTYP_type
      | `BTYP_type_match of 'a * ('Flx_types.btpattern_t' * 'a) list
      | `BTYP_type_tuple of 'a list
      | `BTYP_typefun of (int * 'a) list * 'a * 'a
      | `BTYP_typeset of 'a list
      | `BTYP_typesetintersection of 'a list
      | `BTYP_typesetunion of 'a list
      | `BTYP_var of int * 'a ]
  type 'a btypecode_t' =
      [ `BTYP_apply of 'a * 'a
      | `BTYP_array of 'a * 'a
      | `BTYP_fix of int
      | `BTYP_function of 'a * 'a
      | `BTYP_inst of Flx_ast.bid_t * 'a list
      | `BTYP_intersect of 'a list
      | `BTYP_lvalue of 'a
      | `BTYP_pointer of 'a
      | `BTYP_sum of 'a list
      | `BTYP_tuple of 'a list
      | `BTYP_type
      | `BTYP_type_match of 'a * ('Flx_types.btpattern_t' * 'a) list
      | `BTYP_type_tuple of 'a list
      | `BTYP_typefun of (int * 'a) list * 'a * 'a
      | `BTYP_typeset of 'a list
      | `BTYP_typesetintersection of 'a list
      | `BTYP_typesetunion of 'a list
      | `BTYP_unitsum of int
      | `BTYP_var of int * 'a
      | `BTYP_void ]
  type b0typecode_t = 'Flx_types.b0typecode_t' as 'a
  type btypecode_t = 'Flx_types.btypecode_t' as 'a
  type btpattern_t = Flx_types.btypecode_t Flx_types.btpattern_t'
  type biface_t =
      [ `BIFACE_export_fun of Flx_ast.range_srcref * Flx_ast.bid_t * string
      | `BIFACE_export_type of
          Flx_ast.range_srcref * Flx_types.btypecode_t * string ]
  type regular_args_t =
      int list * int * (int, Flx_types.tbexpr_t) Hashtbl.t *
      (int * int, int) Hashtbl.t
  and bexe_t =
      [ `BEXE_assert of Flx_ast.range_srcref * Flx_types.tbexpr_t
      | `BEXE_assign of
          Flx_ast.range_srcref * Flx_types.tbexpr_t * Flx_types.tbexpr_t
      | `BEXE_begin
      | `BEXE_call of
          Flx_ast.range_srcref * Flx_types.tbexpr_t * Flx_types.tbexpr_t
      | `BEXE_call_direct of
          Flx_ast.range_srcref * Flx_ast.bid_t * Flx_types.btypecode_t list *
          Flx_types.tbexpr_t
      | `BEXE_call_prim of
          Flx_ast.range_srcref * Flx_ast.bid_t * Flx_types.btypecode_t list *
          Flx_types.tbexpr_t
      | `BEXE_call_stack of
          Flx_ast.range_srcref * Flx_ast.bid_t * Flx_types.btypecode_t list *
          Flx_types.tbexpr_t
      | `BEXE_code of Flx_ast.range_srcref * Flx_ast.c_t
      | `BEXE_comment of Flx_ast.range_srcref * string
      | `BEXE_end
      | `BEXE_fun_return of Flx_ast.range_srcref * Flx_types.tbexpr_t
      | `BEXE_goto of Flx_ast.range_srcref * string
      | `BEXE_halt of Flx_ast.range_srcref * string
      | `BEXE_ifgoto of Flx_ast.range_srcref * Flx_types.tbexpr_t * string
      | `BEXE_ifnotgoto of Flx_ast.range_srcref * Flx_types.tbexpr_t * string
      | `BEXE_init of
          Flx_ast.range_srcref * Flx_ast.bid_t * Flx_types.tbexpr_t
      | `BEXE_jump of
          Flx_ast.range_srcref * Flx_types.tbexpr_t * Flx_types.tbexpr_t
      | `BEXE_jump_direct of
          Flx_ast.range_srcref * Flx_ast.bid_t * Flx_types.btypecode_t list *
          Flx_types.tbexpr_t
      | `BEXE_label of Flx_ast.range_srcref * string
      | `BEXE_loop of Flx_ast.range_srcref * int * Flx_types.tbexpr_t
      | `BEXE_nonreturn_code of Flx_ast.range_srcref * Flx_ast.c_t
      | `BEXE_nop of Flx_ast.range_srcref * string
      | `BEXE_proc_return of Flx_ast.range_srcref
      | `BEXE_svc of Flx_ast.range_srcref * Flx_ast.bid_t ]
  and bexpr_t =
      [ `BEXPR_apply of Flx_types.tbexpr_t * Flx_types.tbexpr_t
      | `BEXPR_apply_direct of
          Flx_ast.bid_t * Flx_types.btypecode_t list * Flx_types.tbexpr_t
      | `BEXPR_apply_prim of
          Flx_ast.bid_t * Flx_types.btypecode_t list * Flx_types.tbexpr_t
      | `BEXPR_apply_stack of
          Flx_ast.bid_t * Flx_types.btypecode_t list * Flx_types.tbexpr_t
      | `BEXPR_apply_struct of
          Flx_ast.bid_t * Flx_types.btypecode_t list * Flx_types.tbexpr_t
      | `BEXPR_case of int * Flx_types.btypecode_t
      | `BEXPR_case_arg of int * Flx_types.tbexpr_t
      | `BEXPR_case_index of Flx_types.tbexpr_t
      | `BEXPR_closure of Flx_ast.bid_t * Flx_types.btypecode_t list
      | `BEXPR_deref of Flx_types.tbexpr_t
      | `BEXPR_expr of string * Flx_types.btypecode_t
      | `BEXPR_get_n of int * Flx_types.tbexpr_t
      | `BEXPR_literal of Flx_ast.literal_t
      | `BEXPR_match_case of int * Flx_types.tbexpr_t
      | `BEXPR_name of Flx_ast.bid_t * Flx_types.btypecode_t list
      | `BEXPR_parse of Flx_types.tbexpr_t * int list
      | `BEXPR_ref of Flx_ast.bid_t * Flx_types.btypecode_t list
      | `BEXPR_tuple of Flx_types.tbexpr_t list ]
  and tbexpr_t = Flx_types.bexpr_t * Flx_types.btypecode_t
  and glr_symbol_t = [ `Nonterm of int list | `Term of int ]
  and bglr_entry_t = string option * Flx_types.glr_symbol_t
  and bproduction_t = Flx_types.bglr_entry_t list
  and bparameter_t = string * (int * Flx_types.btypecode_t)
  and breqs_t = (Flx_ast.bid_t * Flx_types.btypecode_t list) list
  and bvs_t = (string * int) list
  and bparams_t = Flx_types.bparameter_t list * Flx_types.tbexpr_t option
  and bclass_member_t =
      [ `BMemberCtor of Flx_ast.id_t * Flx_types.btypecode_t
      | `BMemberFun of Flx_ast.id_t * Flx_types.btypecode_t
      | `BMemberProc of Flx_ast.id_t * Flx_types.btypecode_t
      | `BMemberVal of Flx_ast.id_t * Flx_types.btypecode_t
      | `BMemberVar of Flx_ast.id_t * Flx_types.btypecode_t ]
  and bbdcl_t =
      [ `BBDCL_abs of
          Flx_types.bvs_t * Flx_ast.type_qual_t list * Flx_ast.c_t *
          Flx_types.breqs_t
      | `BBDCL_cclass of Flx_types.bvs_t * Flx_types.bclass_member_t list
      | `BBDCL_const of
          Flx_types.bvs_t * Flx_types.btypecode_t * Flx_ast.c_t *
          Flx_types.breqs_t
      | `BBDCL_cstruct of
          Flx_types.bvs_t * (Flx_ast.id_t * Flx_types.btypecode_t) list
      | `BBDCL_fun of
          Flx_ast.property_t list * Flx_types.bvs_t *
          Flx_types.btypecode_t list * Flx_types.btypecode_t * Flx_ast.c_t *
          Flx_types.breqs_t * Flx_ast.prec_t
      | `BBDCL_function of
          Flx_ast.property_t list * Flx_types.bvs_t * Flx_types.bparams_t *
          Flx_types.btypecode_t * Flx_types.bexe_t list
      | `BBDCL_glr of
          Flx_ast.property_t list * Flx_types.bvs_t * Flx_types.btypecode_t *
          (Flx_types.bproduction_t * Flx_types.bexe_t list)
      | `BBDCL_insert of
          Flx_types.bvs_t * Flx_ast.c_t * Flx_ast.ikind_t * Flx_types.breqs_t
      | `BBDCL_nonconst_ctor of
          Flx_types.bvs_t * int * Flx_types.btypecode_t * int *
          Flx_types.btypecode_t
      | `BBDCL_proc of
          Flx_ast.property_t list * Flx_types.bvs_t *
          Flx_types.btypecode_t list * Flx_ast.c_t * Flx_types.breqs_t
      | `BBDCL_procedure of
          Flx_ast.property_t list * Flx_types.bvs_t * Flx_types.bparams_t *
          Flx_types.bexe_t list
      | `BBDCL_reglex of
          Flx_ast.property_t list * Flx_types.bvs_t * Flx_types.bparams_t *
          int * Flx_types.btypecode_t * Flx_types.regular_args_t
      | `BBDCL_regmatch of
          Flx_ast.property_t list * Flx_types.bvs_t * Flx_types.bparams_t *
          Flx_types.btypecode_t * Flx_types.regular_args_t
      | `BBDCL_struct of
          Flx_types.bvs_t * (Flx_ast.id_t * Flx_types.btypecode_t) list
      | `BBDCL_tmp of Flx_types.bvs_t * Flx_types.btypecode_t
      | `BBDCL_union of
          Flx_types.bvs_t * (Flx_ast.id_t * Flx_types.btypecode_t) list
      | `BBDCL_val of Flx_types.bvs_t * Flx_types.btypecode_t
      | `BBDCL_var of Flx_types.bvs_t * Flx_types.btypecode_t ]
  and typevarmap_t = (int, Flx_types.btypecode_t) Hashtbl.t
  type env_t =
      (Flx_ast.bid_t * Flx_ast.id_t * Flx_types.name_map_t *
       Flx_types.name_map_t list)
      list
  type symbol_definition_t =
      [ `SYMDEF_abs of
          Flx_ast.type_qual_t list * Flx_ast.c_t * Flx_ast.named_reqs_t
      | `SYMDEF_cclass of Flx_ast.class_member_t list
      | `SYMDEF_const of
          Flx_ast.typecode_t * Flx_ast.c_t * Flx_ast.named_reqs_t
      | `SYMDEF_const_ctor of int * Flx_ast.typecode_t * int
      | `SYMDEF_cstruct of (Flx_ast.id_t * Flx_ast.typecode_t) list
      | `SYMDEF_fun of
          Flx_ast.property_t list * Flx_ast.typecode_t list *
          Flx_ast.typecode_t * Flx_ast.c_t * Flx_ast.named_reqs_t *
          Flx_ast.prec_t
      | `SYMDEF_function of
          Flx_ast.params_t * Flx_ast.typecode_t * Flx_ast.property_t list *
          Flx_ast.sexe_t list
      | `SYMDEF_glr of
          Flx_ast.typecode_t *
          (Flx_ast.reduced_production_t * Flx_ast.sexe_t list)
      | `SYMDEF_inherit of Flx_ast.qualified_name_t
      | `SYMDEF_inherit_fun of Flx_ast.qualified_name_t
      | `SYMDEF_insert of
          Flx_ast.c_t * Flx_ast.ikind_t * Flx_ast.named_reqs_t
      | `SYMDEF_match_check of Flx_ast.pattern_t * (string * int)
      | `SYMDEF_module
      | `SYMDEF_nonconst_ctor of
          int * Flx_ast.typecode_t * int * Flx_ast.typecode_t
      | `SYMDEF_parameter of Flx_ast.typecode_t
      | `SYMDEF_regdef of Flx_ast.regexp_t
      | `SYMDEF_reglex of
          Flx_ast.params_t * int * (Flx_ast.regexp_t * Flx_ast.expr_t) list
      | `SYMDEF_regmatch of
          Flx_ast.params_t * (Flx_ast.regexp_t * Flx_ast.expr_t) list
      | `SYMDEF_struct of (Flx_ast.id_t * Flx_ast.typecode_t) list
      | `SYMDEF_type_alias of Flx_ast.typecode_t
      | `SYMDEF_typevar of Flx_ast.typecode_t
      | `SYMDEF_union of (Flx_ast.id_t * Flx_ast.typecode_t) list
      | `SYMDEF_val of Flx_ast.typecode_t
      | `SYMDEF_var of Flx_ast.typecode_t ]
  type symbol_data_t = {
    id : string;
    sr : Flx_ast.range_srcref;
    parent : int option;
    vs : Flx_ast.ivs_list_t;
    pubmap : Flx_types.name_map_t;
    privmap : Flx_types.name_map_t;
    dirs : Flx_types.dir_t list;
    symdef : Flx_types.symbol_definition_t;
  }
  type symbol_table_t = (int, Flx_types.symbol_data_t) Hashtbl.t
  type symbol_data3_t =
      string * int option * Flx_ast.range_srcref * Flx_types.bbdcl_t
  type fully_bound_symbol_table_t = (int, Flx_types.symbol_data3_t) Hashtbl.t
  type type_registry_t = (Flx_types.btypecode_t, int) Hashtbl.t
end