package libsail

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Libsail.ProjectSource

Definition of Sail project files, and functions for working with them.

Sourcemodule ModId : sig ... end

Module identifiers are just integers, but we don't want to expose that representation to the world.

Sourcetype mod_id = ModId.t
Sourceval global_scope : mod_id

The global scope is for code not defined in any module.

Sourcemodule ModSet : sig ... end
Sourcetype 'a spanned = 'a * l
Sourceval to_loc : l -> Parse_ast.l

Convert a project file location to a full Parse_ast location

Sourcetype value
Sourceval bool_value : bool -> value
Sourceval string_value : string -> value
Sourceval parse_assignment : variables:value Util.StringMap.t ref -> string -> bool
Sourcetype exp =
  1. | E_app of string * exp spanned list
  2. | E_file of string * string
  3. | E_id of string
  4. | E_if of exp spanned * exp spanned * exp spanned
  5. | E_list of exp spanned list
  6. | E_op of exp spanned * string * exp spanned
  7. | E_parent
  8. | E_string of string
  9. | E_value of value
  10. | E_var of string
Sourcetype 'a non_empty = 'a * 'a list
Sourcetype dependency =
  1. | D_requires of exp spanned non_empty
  2. | D_after of exp spanned non_empty
  3. | D_before of exp spanned non_empty
Sourcetype mdl_def =
  1. | M_dep of dependency
  2. | M_directory of exp spanned
  3. | M_module of mdl
  4. | M_files of exp spanned non_empty
Sourceand mdl = {
  1. name : string spanned;
  2. defs : mdl_def spanned list;
  3. span : l;
}
Sourcetype def =
  1. | Def_root of string
  2. | Def_var of string spanned * exp spanned
  3. | Def_module of mdl
  4. | Def_test of string list
Sourceval mk_root : string -> def spanned
Sourcetype project_structure
Sourceval initialize_project_structure : variables:value Util.StringMap.t ref -> def spanned list -> project_structure
Sourceval get_module_id : project_structure -> string -> mod_id option
Sourceval get_children : mod_id -> project_structure -> ModSet.t
Sourceval required_modules : roots:ModSet.t -> project_structure -> mod_id -> bool

Create a predicate that returns true for any module that is (transitively) required by any module in the roots set of modules.

Sourceval module_name : project_structure -> mod_id -> string spanned
Sourceval valid_module_id : project_structure -> mod_id -> bool
Sourceval module_order : project_structure -> mod_id list
Sourceval module_files : project_structure -> mod_id -> string spanned list
Sourceval module_requires : project_structure -> mod_id -> mod_id list
Sourceval all_files : project_structure -> string spanned list
Sourceval all_modules : project_structure -> mod_id list
OCaml

Innovation. Community. Security.