package acgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=07f391d052090bb70c10ec511fdc53af764954cbe1c30093778984c5ed41a4327573fdac0890c6fd619ff9827725572eb7b8a7545bd8ccb7f5bddb84d2d7f7cc
doc/acgtk.acgData/AcgData/Environment/Environment/index.html
Module Environment.EnvironmentSource
This module signature describes the interface for modules implementing environments
The type of the environment
The type of the environment when dumped to file
type entry = | Signature of Signature.Data_Signature.t| Lexicon of Acg_lexicon.Data_Lexicon.t(*The type of what an environment can contain
*)
insert c ~to_be_dumped:d e adds the content c into the environment e and returns the resulting environmnent. If d is set to true, then c will be dumped in e . The default value for the overwrite optional parameter is false.
list_signatures e returns a list containing the names of all signatures in the environment e.
list_lexicons e returns a list containing the names of all lexicons in the environment e.
prepare_dump ~filename e returns the environment a ready to be dumped (in file filename environment of type dumped_t similar to e, but without the data which has false in to_be_dumped. The data of the returned environment has false in to_be_dumped. If force is set to true (default is false), all the data available in the environement are dumped anyway, whether they have their to_be_dumped flag set to true or not. It is useful in case we want to generate a full environment out of only object files.
get name e loc returns the entry of name name in the environment e. Raise a corresponding error is there is no such entry.
get_opt name e returns the entry of name name in the environment e. Returns none if there is no such entry.
get name e loc returns the signature of name name in the environment e. Raise a corresponding error is there is no such signature.
get name e loc returns the lexicon of name name in the environment e. Raise a corresponding error is there is no such lexicon.
append e1 e2 merges the two environment e1 and e2. If an entry appears in both environment then the one of e2 is kept if the overwrite parameter is set to true (default is false). If set to false, if an entry appears in both environment, an error is emitted.
iter f e applies f to every data contained in the environment
fold f a e returns f a_n (f a_n-1 (... (f a1 (f a0 a)) ... )) where the a_0 ... a_n are the n+1 elements of the environmnent
sig_number e returns the number of signatures an environment contains
choose_signature e returns a randomly chosen signature in the environment e