module Atd_util: sig
.. end
Top-level utilities
val read_lexbuf : ?expand:bool ->
?keep_poly:bool ->
?xdebug:bool ->
?inherit_fields:bool ->
?inherit_variants:bool -> Lexing.lexbuf -> Atd_ast.full_module
Read an ATD file from a lexbuf. See also load_file
and load_string
.
expand
: Perform monomorphization by creating specialized
type definitions starting with an underscore.
Default is false. See also
Atd_expand
.
This corresponds to the
-x
option of
atdcat
.
keep_poly
: Preserve left-hand-side of all original type definitions
instead of removing parametrized definitions.
This option only applies when
expand = true
.
Default is false. See also
Atd_expand
.
This corresponds to the
-xk
option of
atdcat
.
xdebug
: Debugging option producing meaningful but non ATD-compliant
type names when new types names are created.
Default is false.
This corresponds to the -xd
option of atdcat
.
inherit_fields
: Expand
inherit
statements in record types.
Default is false. See also
Atd_inherit
.
This corresponds to the
-if
option of
atdcat
.
inherit_variants
: Expand
inherit
statements in sum types.
Default is false. See also
Atd_inherit
.
This corresponds to the
-iv
option of
atdcat
.
val load_file : ?expand:bool ->
?keep_poly:bool ->
?xdebug:bool ->
?inherit_fields:bool ->
?inherit_variants:bool -> string -> Atd_ast.full_module
Read an ATD file. Options: see read_lexbuf
.
val load_string : ?expand:bool ->
?keep_poly:bool ->
?xdebug:bool ->
?inherit_fields:bool ->
?inherit_variants:bool -> string -> Atd_ast.full_module
Read ATD data from a string. Options: see read_lexbuf
.
val tsort : Atd_ast.module_body -> (bool * Atd_ast.module_body) list
Topological sort for dependency analysis.
tsort
splits definitions into mutually-recursive groups,
ordered such that each group may only depend on type definitions
of its own group or previous groups.
The boolean flags indicate groups of one or more
mutually recursive definitions.