package gospel

  1. Overview
  2. Docs

Namespace

module Mstr : sig ... end
type 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;
}
val empty_ns : namespace
exception NameClash of string
val add : allow_duplicate:bool -> equal:('a -> 'b -> bool) -> loc:Ppxlib.Location.t -> 'c Mstr.t -> Mstr.key -> 'd -> 'c Mstr.t
val ns_add_ts : allow_duplicate:bool -> namespace -> Mstr.key -> Ttypes.tysymbol -> namespace
val ns_add_ls : allow_duplicate:'a -> namespace -> Mstr.key -> Tterm.lsymbol -> namespace
val ns_add_fd : allow_duplicate:'a -> namespace -> Mstr.key -> Tterm.lsymbol -> namespace
val ns_add_xs : allow_duplicate:bool -> namespace -> Mstr.key -> Ttypes.xsymbol -> namespace
val ns_add_ns : allow_duplicate:'a -> namespace -> Mstr.key -> namespace -> namespace
val ns_add_tns : allow_duplicate:'a -> namespace -> Mstr.key -> namespace -> namespace
val merge_ns : namespace -> namespace -> namespace
val ns_find : (namespace -> 'a Mstr.t) -> namespace -> Mstr.key list -> 'b
val ns_find_ts : namespace -> Mstr.key list -> Ttypes.tysymbol
val ns_find_ls : namespace -> Mstr.key list -> Tterm.lsymbol
val ns_find_fd : namespace -> Mstr.key list -> Tterm.lsymbol
val ns_find_xs : namespace -> Mstr.key list -> Ttypes.xsymbol
val ns_find_ns : namespace -> Mstr.key list -> namespace
val ns_find_tns : namespace -> Mstr.key list -> namespace
val ns_exists_ns : namespace -> Mstr.key -> bool
val ns_rm_ts : namespace -> Mstr.key list -> namespace
val ns_replace_ts : Ttypes.tysymbol -> Mstr.key list -> namespace -> namespace

Primitives types and functions

val ns_with_primitives : namespace

Modules

module Mid : sig ... end
type known_ids = Tast.signature_item Mid.t
type file = {
  1. fl_nm : Gospel.Tast.Ident.t;
  2. fl_sigs : Tast.signature;
  3. fl_export : namespace;
}
type 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;
}
val muc_add : ?export:bool -> (allow_duplicate:bool -> namespace -> 'a -> 'b -> namespace) -> module_uc -> 'c -> 'd -> module_uc
val add_ts : ?export:bool -> module_uc -> Mstr.key -> Ttypes.tysymbol -> module_uc
val add_ls : ?export:bool -> module_uc -> Mstr.key -> Tterm.lsymbol -> module_uc
val add_fd : ?export:bool -> module_uc -> Mstr.key -> Tterm.lsymbol -> module_uc
val add_xs : ?export:bool -> module_uc -> Mstr.key -> Ttypes.xsymbol -> module_uc
val add_ns : ?export:bool -> module_uc -> Mstr.key -> namespace -> module_uc
val add_tns : ?export:bool -> module_uc -> Mstr.key -> namespace -> module_uc
val add_file : module_uc -> Mstr.key -> file -> module_uc
val get_file : module_uc -> Mstr.key -> file
val add_coer : module_uc -> Tterm.lsymbol -> module_uc
val add_ns_top : ?export:bool -> module_uc -> namespace -> module_uc
val muc_replace_ts : module_uc -> Ttypes.tysymbol -> Mstr.key list -> module_uc
val muc_rm_ts : module_uc -> Mstr.key list -> module_uc
val open_empty_module : module_uc -> string -> module_uc
val close_module_file : module_uc -> module_uc
val open_module : module_uc -> string -> module_uc
val close_module : module_uc -> module_uc
val close_module_functor : module_uc -> module_uc
val close_module_type : module_uc -> module_uc
val get_top_sigs : module_uc -> Tast.signature_item list
val get_top_import : module_uc -> namespace
val get_top_export : module_uc -> namespace
val add_sig_contents : module_uc -> Tast.signature_item -> module_uc

Module under construction with primitive types and functions

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

Pretty printing

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