Module Core.Local_env
type md_expr
=[
|
`Structure
|
`Functor
]
type path
= [ `Psig_module of string | md_expr ] list
path
is a DFS representation of recursive signature item
type psig_value
psig_value
stores the function with the associated specification found in the attributes.The
path
and actual signature_item is stored insidepsig_value
in order to be retrived in the respective structure_item
val get_path : psig_value -> path
get_path psig_value
returns the path insidepsig_value
val get_properties : psig_value -> Properties.t
get_properties psig_value
returns the properties insidepsig_value
val get_name : psig_value -> string
get_name psig_value
returns the function name insidepsig_value
val get_value : psig_value -> Ppxlib.signature_item option
get_value psig_value
returns the actual value insidepsig_value
val get_file_name : unit -> string
get_file_name ()
returns the file_name inside the environmentt
Default value is "_none_" if the file_name has not been set
val get_file_name_exn : unit -> string
get_file_name_exn ()
returns the file_name inside the environmentt
Raise an exception if the file_name has not been set
val get_file_name_opt : unit -> string option
get_file_name_opt ()
returns the file_name inside the environmentt
Returns None if the file_name has not been set
val get_psig_values : unit -> psig_value list
get_psig_values ()
returns the list of psig_value in the environmentt
val env_with_psig_value : psig_value -> unit
env_with_psig_value psig_value
addpsig_value
to the environmentt
val env_with_file_name : string -> unit
env_with_file_name file_name
set the file_name in the environmentt
val add_env : ?path:path -> ?properties:Properties.t -> ?value:Ppxlib.signature_item -> string -> unit
add_env name
build and add a psig_value in the environmentt
val init_env : ?file_name:string -> unit -> unit
init_env
reset the environment to default state, file_name being processed can be set at this point with the parameterfile_name