sig
  module Ast :
    sig
      type loc = Ast.loc
      type meta_bool = Ast.meta_bool
      type 'a meta_option = 'Ast.meta_option
      type 'a meta_list = 'Ast.meta_list
      type ctyp = Ast.ctyp
      type patt = Ast.patt
      type expr = Ast.expr
      type module_type = Ast.module_type
      type sig_item = Ast.sig_item
      type with_constr = Ast.with_constr
      type module_expr = Ast.module_expr
      type str_item = Ast.str_item
      type class_type = Ast.class_type
      type class_sig_item = Ast.class_sig_item
      type class_expr = Ast.class_expr
      type class_str_item = Ast.class_str_item
      type match_case = Ast.match_case
      type ident = Ast.ident
      type binding = Ast.binding
      type rec_binding = Ast.rec_binding
      type module_binding = Ast.module_binding
      type rec_flag = Ast.rec_flag
      type direction_flag = Ast.direction_flag
      type mutable_flag = Ast.mutable_flag
      type private_flag = Ast.private_flag
      type virtual_flag = Ast.virtual_flag
      type row_var_flag = Ast.row_var_flag
      type override_flag = Ast.override_flag
      val loc_of_ctyp : ctyp -> loc
      val loc_of_patt : patt -> loc
      val loc_of_expr : expr -> loc
      val loc_of_module_type : module_type -> loc
      val loc_of_module_expr : module_expr -> loc
      val loc_of_sig_item : sig_item -> loc
      val loc_of_str_item : str_item -> loc
      val loc_of_class_type : class_type -> loc
      val loc_of_class_sig_item : class_sig_item -> loc
      val loc_of_class_expr : class_expr -> loc
      val loc_of_class_str_item : class_str_item -> loc
      val loc_of_with_constr : with_constr -> loc
      val loc_of_binding : binding -> loc
      val loc_of_rec_binding : rec_binding -> loc
      val loc_of_module_binding : module_binding -> loc
      val loc_of_match_case : match_case -> loc
      val loc_of_ident : ident -> loc
      class map :
        object ('a)
          method binding : binding -> binding
          method class_expr : class_expr -> class_expr
          method class_sig_item : class_sig_item -> class_sig_item
          method class_str_item : class_str_item -> class_str_item
          method class_type : class_type -> class_type
          method ctyp : ctyp -> ctyp
          method direction_flag : direction_flag -> direction_flag
          method expr : expr -> expr
          method ident : ident -> ident
          method list : ('-> '-> 'c) -> 'b list -> 'c list
          method loc : loc -> loc
          method match_case : match_case -> match_case
          method meta_bool : meta_bool -> meta_bool
          method meta_list : ('-> '-> 'e) -> 'd meta_list -> 'e meta_list
          method meta_option :
            ('-> '-> 'g) -> 'f meta_option -> 'g meta_option
          method module_binding : module_binding -> module_binding
          method module_expr : module_expr -> module_expr
          method module_type : module_type -> module_type
          method mutable_flag : mutable_flag -> mutable_flag
          method override_flag : override_flag -> override_flag
          method patt : patt -> patt
          method private_flag : private_flag -> private_flag
          method rec_binding : rec_binding -> rec_binding
          method rec_flag : rec_flag -> rec_flag
          method row_var_flag : row_var_flag -> row_var_flag
          method sig_item : sig_item -> sig_item
          method str_item : str_item -> str_item
          method string : string -> string
          method unknown : '-> 'h
          method virtual_flag : virtual_flag -> virtual_flag
          method with_constr : with_constr -> with_constr
        end
      class fold :
        object ('a)
          method binding : binding -> 'a
          method class_expr : class_expr -> 'a
          method class_sig_item : class_sig_item -> 'a
          method class_str_item : class_str_item -> 'a
          method class_type : class_type -> 'a
          method ctyp : ctyp -> 'a
          method direction_flag : direction_flag -> 'a
          method expr : expr -> 'a
          method ident : ident -> 'a
          method list : ('-> '-> 'a) -> 'b list -> 'a
          method loc : loc -> 'a
          method match_case : match_case -> 'a
          method meta_bool : meta_bool -> 'a
          method meta_list : ('-> '-> 'a) -> 'c meta_list -> 'a
          method meta_option : ('-> '-> 'a) -> 'd meta_option -> 'a
          method module_binding : module_binding -> 'a
          method module_expr : module_expr -> 'a
          method module_type : module_type -> 'a
          method mutable_flag : mutable_flag -> 'a
          method override_flag : override_flag -> 'a
          method patt : patt -> 'a
          method private_flag : private_flag -> 'a
          method rec_binding : rec_binding -> 'a
          method rec_flag : rec_flag -> 'a
          method row_var_flag : row_var_flag -> 'a
          method sig_item : sig_item -> 'a
          method str_item : str_item -> 'a
          method string : string -> 'a
          method unknown : '-> 'a
          method virtual_flag : virtual_flag -> 'a
          method with_constr : with_constr -> 'a
        end
    end
  module DynAst :
    sig
      module Ast :
        sig
          type loc = Ast.loc
          type meta_bool = Ast.meta_bool
          type 'a meta_option = 'Ast.meta_option
          type 'a meta_list = 'Ast.meta_list
          type ctyp = Ast.ctyp
          type patt = Ast.patt
          type expr = Ast.expr
          type module_type = Ast.module_type
          type sig_item = Ast.sig_item
          type with_constr = Ast.with_constr
          type module_expr = Ast.module_expr
          type str_item = Ast.str_item
          type class_type = Ast.class_type
          type class_sig_item = Ast.class_sig_item
          type class_expr = Ast.class_expr
          type class_str_item = Ast.class_str_item
          type match_case = Ast.match_case
          type ident = Ast.ident
          type binding = Ast.binding
          type rec_binding = Ast.rec_binding
          type module_binding = Ast.module_binding
          type rec_flag = Ast.rec_flag
          type direction_flag = Ast.direction_flag
          type mutable_flag = Ast.mutable_flag
          type private_flag = Ast.private_flag
          type virtual_flag = Ast.virtual_flag
          type row_var_flag = Ast.row_var_flag
          type override_flag = Ast.override_flag
          val loc_of_ctyp : ctyp -> loc
          val loc_of_patt : patt -> loc
          val loc_of_expr : expr -> loc
          val loc_of_module_type : module_type -> loc
          val loc_of_module_expr : module_expr -> loc
          val loc_of_sig_item : sig_item -> loc
          val loc_of_str_item : str_item -> loc
          val loc_of_class_type : class_type -> loc
          val loc_of_class_sig_item : class_sig_item -> loc
          val loc_of_class_expr : class_expr -> loc
          val loc_of_class_str_item : class_str_item -> loc
          val loc_of_with_constr : with_constr -> loc
          val loc_of_binding : binding -> loc
          val loc_of_rec_binding : rec_binding -> loc
          val loc_of_module_binding : module_binding -> loc
          val loc_of_match_case : match_case -> loc
          val loc_of_ident : ident -> loc
          class map :
            object ('a)
              method binding : binding -> binding
              method class_expr : class_expr -> class_expr
              method class_sig_item : class_sig_item -> class_sig_item
              method class_str_item : class_str_item -> class_str_item
              method class_type : class_type -> class_type
              method ctyp : ctyp -> ctyp
              method direction_flag : direction_flag -> direction_flag
              method expr : expr -> expr
              method ident : ident -> ident
              method list : ('-> '-> 'c) -> 'b list -> 'c list
              method loc : loc -> loc
              method match_case : match_case -> match_case
              method meta_bool : meta_bool -> meta_bool
              method meta_list :
                ('-> '-> 'e) -> 'd meta_list -> 'e meta_list
              method meta_option :
                ('-> '-> 'g) -> 'f meta_option -> 'g meta_option
              method module_binding : module_binding -> module_binding
              method module_expr : module_expr -> module_expr
              method module_type : module_type -> module_type
              method mutable_flag : mutable_flag -> mutable_flag
              method override_flag : override_flag -> override_flag
              method patt : patt -> patt
              method private_flag : private_flag -> private_flag
              method rec_binding : rec_binding -> rec_binding
              method rec_flag : rec_flag -> rec_flag
              method row_var_flag : row_var_flag -> row_var_flag
              method sig_item : sig_item -> sig_item
              method str_item : str_item -> str_item
              method string : string -> string
              method unknown : '-> 'h
              method virtual_flag : virtual_flag -> virtual_flag
              method with_constr : with_constr -> with_constr
            end
          class fold :
            object ('a)
              method binding : binding -> 'a
              method class_expr : class_expr -> 'a
              method class_sig_item : class_sig_item -> 'a
              method class_str_item : class_str_item -> 'a
              method class_type : class_type -> 'a
              method ctyp : ctyp -> 'a
              method direction_flag : direction_flag -> 'a
              method expr : expr -> 'a
              method ident : ident -> 'a
              method list : ('-> '-> 'a) -> 'b list -> 'a
              method loc : loc -> 'a
              method match_case : match_case -> 'a
              method meta_bool : meta_bool -> 'a
              method meta_list : ('-> '-> 'a) -> 'c meta_list -> 'a
              method meta_option : ('-> '-> 'a) -> 'd meta_option -> 'a
              method module_binding : module_binding -> 'a
              method module_expr : module_expr -> 'a
              method module_type : module_type -> 'a
              method mutable_flag : mutable_flag -> 'a
              method override_flag : override_flag -> 'a
              method patt : patt -> 'a
              method private_flag : private_flag -> 'a
              method rec_binding : rec_binding -> 'a
              method rec_flag : rec_flag -> 'a
              method row_var_flag : row_var_flag -> 'a
              method sig_item : sig_item -> 'a
              method str_item : str_item -> 'a
              method string : string -> 'a
              method unknown : '-> 'a
              method virtual_flag : virtual_flag -> 'a
              method with_constr : with_constr -> 'a
            end
        end
      type 'a tag = 'Quotation.DynAst.tag
      val ctyp_tag : Ast.ctyp tag
      val patt_tag : Ast.patt tag
      val expr_tag : Ast.expr tag
      val module_type_tag : Ast.module_type tag
      val sig_item_tag : Ast.sig_item tag
      val with_constr_tag : Ast.with_constr tag
      val module_expr_tag : Ast.module_expr tag
      val str_item_tag : Ast.str_item tag
      val class_type_tag : Ast.class_type tag
      val class_sig_item_tag : Ast.class_sig_item tag
      val class_expr_tag : Ast.class_expr tag
      val class_str_item_tag : Ast.class_str_item tag
      val match_case_tag : Ast.match_case tag
      val ident_tag : Ast.ident tag
      val binding_tag : Ast.binding tag
      val rec_binding_tag : Ast.rec_binding tag
      val module_binding_tag : Ast.module_binding tag
      val string_of_tag : 'a tag -> string
      module Pack :
        functor (X : sig type 'a t end->
          sig
            type pack = Quotation.DynAst.Pack(X).pack
            val pack : 'a tag -> 'X.t -> pack
            val unpack : 'a tag -> pack -> 'X.t
            val print_tag : Format.formatter -> pack -> unit
          end
    end
  type 'a expand_fun = Ast.loc -> string option -> string -> 'a
  val add : string -> 'DynAst.tag -> 'a expand_fun -> unit
  val find : string -> 'DynAst.tag -> 'a expand_fun
  val default : string ref
  val parse_quotation_result :
    (Ast.loc -> string -> 'a) ->
    Ast.loc -> Sig.quotation -> string -> string -> 'a
  val translate : (string -> string) ref
  val expand : Ast.loc -> Sig.quotation -> 'DynAst.tag -> 'a
  val dump_file : string option ref
  module Error :
    sig
      type t = Quotation.Error.t
      exception E of t
      val to_string : t -> string
      val print : Format.formatter -> t -> unit
    end
end