package gospel

  1. Overview
  2. Docs

Module Gospel.TmoduleSource

Namespace

Sourcemodule Mstr : sig ... end
Sourcetype namespace = {
  1. ns_ts : Ttypes.tysymbol Mstr.t;
  2. ns_ls : Tterm.lsymbol Mstr.t;
  3. ns_fd : Tterm.lsymbol Mstr.t;
  4. ns_xs : Ttypes.xsymbol Mstr.t;
  5. ns_ns : namespace Mstr.t;
  6. ns_tns : namespace Mstr.t;
}
Sourceval empty_ns : namespace
Sourceexception NameClash of string
Sourceval add : allow_duplicate:bool -> equal:('a -> 'a -> bool) -> loc:Ppxlib.Location.t -> 'a Mstr.t -> Mstr.key -> 'a -> 'a Mstr.t
Sourceval ns_add_ts : allow_duplicate:bool -> namespace -> Mstr.key -> Ttypes.tysymbol -> namespace
Sourceval ns_add_ls : allow_duplicate:'a -> namespace -> Mstr.key -> Tterm.lsymbol -> namespace
Sourceval ns_add_fd : allow_duplicate:'a -> namespace -> Mstr.key -> Tterm.lsymbol -> namespace
Sourceval ns_add_xs : allow_duplicate:bool -> namespace -> Mstr.key -> Ttypes.xsymbol -> namespace
Sourceval ns_add_ns : allow_duplicate:'a -> namespace -> Mstr.key -> namespace -> namespace
Sourceval ns_add_tns : allow_duplicate:'a -> namespace -> Mstr.key -> namespace -> namespace
Sourceval merge_ns : namespace -> namespace -> namespace
Sourceval ns_find : (namespace -> 'a Mstr.t) -> namespace -> Mstr.key list -> 'a
Sourceval ns_find_ts : namespace -> Mstr.key list -> Ttypes.tysymbol
Sourceval ns_find_ls : namespace -> Mstr.key list -> Tterm.lsymbol
Sourceval ns_find_fd : namespace -> Mstr.key list -> Tterm.lsymbol
Sourceval ns_find_xs : namespace -> Mstr.key list -> Ttypes.xsymbol
Sourceval ns_find_ns : namespace -> Mstr.key list -> namespace
Sourceval ns_find_tns : namespace -> Mstr.key list -> namespace
Sourceval ns_exists_ns : namespace -> Mstr.key -> bool
Sourceval ns_rm_ts : namespace -> Mstr.key list -> namespace
Sourceval ns_replace_ts : Ttypes.tysymbol -> Mstr.key list -> namespace -> namespace

Primitives types and functions

Sourceval ns_with_primitives : namespace

Modules

Sourcemodule Mid : sig ... end
Sourcetype file = {
  1. fl_nm : Gospel.Tast.Ident.t;
  2. fl_sigs : Tast.signature;
  3. fl_export : namespace;
}
Sourcetype module_uc = {
  1. muc_nm : Gospel.Tast.Ident.t;
  2. muc_sigs : Tast.signature list;
  3. muc_prefix : string list;
  4. muc_import : namespace list;
  5. muc_export : namespace list;
  6. muc_files : file Mstr.t;
  7. muc_kid : known_ids;
  8. muc_crcm : Coercion.t;
}
Sourceval muc_add : ?export:bool -> (allow_duplicate:bool -> namespace -> 'a -> 'b -> namespace) -> module_uc -> 'a -> 'b -> module_uc
Sourceval add_ts : ?export:bool -> module_uc -> Mstr.key -> Ttypes.tysymbol -> module_uc
Sourceval add_ls : ?export:bool -> module_uc -> Mstr.key -> Tterm.lsymbol -> module_uc
Sourceval add_fd : ?export:bool -> module_uc -> Mstr.key -> Tterm.lsymbol -> module_uc
Sourceval add_xs : ?export:bool -> module_uc -> Mstr.key -> Ttypes.xsymbol -> module_uc
Sourceval add_ns : ?export:bool -> module_uc -> Mstr.key -> namespace -> module_uc
Sourceval add_tns : ?export:bool -> module_uc -> Mstr.key -> namespace -> module_uc
Sourceval add_file : module_uc -> Mstr.key -> file -> module_uc
Sourceval get_file : module_uc -> Mstr.key -> file
Sourceval add_ns_top : ?export:bool -> module_uc -> namespace -> module_uc
Sourceval muc_replace_ts : module_uc -> Ttypes.tysymbol -> Mstr.key list -> module_uc
Sourceval muc_rm_ts : module_uc -> Mstr.key list -> module_uc
Sourceval open_empty_module : module_uc -> string -> module_uc
Sourceval close_module_file : module_uc -> module_uc
Sourceval open_module : module_uc -> string -> module_uc
Sourceval close_module : module_uc -> module_uc
Sourceval close_module_functor : module_uc -> module_uc
Sourceval close_module_type : module_uc -> module_uc
Sourceval get_top_sigs : module_uc -> Tast.signature_item list
Sourceval get_top_import : module_uc -> namespace
Sourceval get_top_export : module_uc -> namespace
Sourceval add_sig_contents : module_uc -> Tast.signature_item -> module_uc

Module under construction with primitive types and functions

Sourceval init_muc : string -> module_uc
Sourceval wrap_up_muc : module_uc -> file

Pretty printing

Sourceval tree_ns : ('a -> 'a Mstr.t) -> Format.formatter -> 'a Mstr.t -> unit
Sourceval ns_names : 'a Mstr.t -> Mstr.key list
Sourceval print_mstr_vals : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a Mstr.t -> unit
Sourceval print_nested_ns : Format.formatter -> namespace Mstr.t -> unit
Sourceval print_ns : Mstr.key -> Format.formatter -> namespace -> unit
Sourceval print_file : Format.formatter -> file -> unit