package kappa-library

  1. Overview
  2. Docs
Public internals of the Kappa tool suite. Use this package to use kappa as a lib

Install

Dune Dependency

Authors

Maintainers

Sources

v4.1.3.tar.gz
md5=1c9a8a0d79f085757817f90834e166f5
sha512=13ac40442940ba6e72d7dc5bf952e67443872f7bff63e9c76a3a699a6904c88696047fe04519b7ec6546371642f6ee7b0983117be302694aca15500b0df40de3

doc/kappa-library.generic/Kappa_data_structures/NamedDecls/index.html

Module Kappa_data_structures.NamedDeclsSource

Stores a bunch of stuff the user gave a name to

Sourcetype 'a t = private {
  1. decls : (string * 'a) array;
    (*

    the name of the stuff * the stuff

    *)
  2. finder : int Kappa_data_structures.Mods.StringMap.t;
    (*

    fst (fst d.decls.(StringMap.find s d.finder)) MUST be equal to s

    *)
}
Sourceval create : ?forbidden:Kappa_data_structures.Mods.StringSet.t -> (string Loc.annoted * 'a) array -> 'a t

create ~forbidden string_val_assoc evaluates to a namedDecls.t from the string-to-variable associations string_val_assoc except from strings in forbidden. Loc info is not kept.

Sourceval create_from_list : ?forbidden:Kappa_data_structures.Mods.StringSet.t -> (string Loc.annoted * 'a) list -> 'a t
Sourceval create_no_loc : ?forbidden:Kappa_data_structures.Mods.StringSet.t -> (string * 'a) array -> 'a t

create_no_loc behaves the same as create, but without the need to provide the Loc info that will be trashed

Sourceval size : 'a t -> int
Sourceval elt_name : 'a t -> int -> string

elt_name nd i evaluates to the name declaration of id i in nd, or raises an exception if it doesn't exist

Sourceval elt_id : ?kind:string -> 'a t -> string Loc.annoted -> int

elt_id ~kind nd (s, pos) evaluates to the data matching declaration s in nd, or if it doesn't exist, throw and exception with info about kind and pos

Sourceval elt_val : 'a t -> int -> 'a

Access data by id

Sourceval fold : (int -> string -> 'a -> 'b -> 'a) -> 'a -> 'b t -> 'a
Sourceval map : (string -> 'a -> 'b) -> 'a t -> 'b t
Sourceval mapi : (int -> string -> 'a -> 'b) -> 'a t -> 'b t
Sourceval print : sep:(Format.formatter -> unit) -> (int -> string -> Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit
Sourceval debug_print : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit
Sourceval to_json : ('a -> Yojson.Basic.t) -> 'a t -> Yojson.Basic.t
Sourceval of_json : (Yojson.Basic.t -> 'a) -> Yojson.Basic.t -> 'a t
OCaml

Innovation. Community. Security.