OpamTypesBaseHelper functions on the base types (from OpamTypes)
This module contains basic utility functions and stringifiers for the basic OPAM types present in OpamTypes.ml
val string_of_std_path : OpamTypes.std_path -> stringval std_path_of_string : string -> OpamTypes.std_pathval all_std_paths : OpamTypes.std_path listval action_equal :
('a -> 'a -> bool) ->
'a OpamTypes.action ->
'a OpamTypes.action ->
boolval action_contents : [< 'a OpamTypes.action ] -> 'a listExtract a package from a package action.
val map_atomic_action :
('a -> 'b) ->
'a OpamTypes.atomic_action ->
'b OpamTypes.atomic_actionval map_highlevel_action :
('a -> 'b) ->
'a OpamTypes.highlevel_action ->
'b OpamTypes.highlevel_actionval map_concrete_action :
('a -> 'b) ->
'a OpamTypes.concrete_action ->
'b OpamTypes.concrete_actionval map_action : ('a -> 'b) -> 'a OpamTypes.action -> 'b OpamTypes.actionval full_action_contents : 'a OpamTypes.action -> 'a listExtract a packages from a package action. This returns all concerned packages, including the old version for an up/down-grade.
val string_of_cause : ('pkg -> string) -> 'pkg OpamTypes.cause -> stringPretty-prints the cause of an action
val string_of_shell : OpamTypes.shell -> stringPretty-print
val pos_null : OpamParserTypes.FullPos.posThe empty file position
val nullify_pos : 'a -> 'a OpamParserTypes.FullPos.with_posval nullify_pos_map :
('a -> 'b) ->
'a OpamParserTypes.FullPos.with_pos ->
'b OpamParserTypes.FullPos.with_posval nullify_pos_value :
OpamParserTypes.FullPos.value ->
OpamParserTypes.FullPos.valueval pos_best :
OpamParserTypes.FullPos.pos ->
OpamParserTypes.FullPos.pos ->
OpamParserTypes.FullPos.pospos_best pos1 pos2 returns the most detailed position between pos1 and pos2 (defaulting to pos1)
val pos_file : OpamTypes.filename -> OpamParserTypes.FullPos.posPosition in the given file, with unspecified line and column
val string_of_pos : OpamParserTypes.FullPos.pos -> stringPrints a file position
val string_of_user_action : OpamTypes.user_action -> stringval env_array : OpamTypes.env -> string arrayMakes sure to keep only the last binding for a given variable; doesn't preserve order
val filter_ident_of_string :
string ->
OpamTypes.name option list * OpamTypes.variable * (string * string) optionParses the data suitable for a filter.FIdent from a string. A self-reference _ parses to None.
val filter_ident_of_string_interp :
?accept:bool ->
string ->
OpamTypes.name option list * OpamTypes.variable * (string * string) optionLike filter_ident_of_string but parses also %{?pkg+:var:}% syntax for variables with package name that contains a +.
val string_of_filter_ident :
(OpamTypes.name option list * OpamTypes.variable * (string * string) option) ->
stringval pkg_flag_equal : OpamTypes.package_flag -> OpamTypes.package_flag -> boolval pkg_flag_of_string : string -> OpamTypes.package_flagval string_of_pkg_flag : OpamTypes.package_flag -> stringval all_package_flags : OpamTypes.package_flag listval map_success :
('a -> 'b) ->
('a, 'fail) OpamTypes.result ->
('b, 'fail) OpamTypes.resultMap on a solver result
val iter_success : ('a -> unit) -> ('a, 'b) OpamTypes.result -> unitval env_update :
?comment:string ->
rewrite:'a OpamTypes.separator_path_format option ->
string ->
'b OpamTypes.env_update_op_kind ->
string ->
('a, 'b) OpamTypes.env_updateEnvironment update helpers
val env_update_resolved :
?comment:string ->
?rewrite:OpamTypes.spf_resolved OpamTypes.separator_path_format option ->
string ->
'a OpamTypes.env_update_op_kind ->
string ->
(OpamTypes.spf_resolved, 'a) OpamTypes.env_updateval env_update_unresolved :
?comment:string ->
?rewrite:OpamTypes.spf_unresolved OpamTypes.separator_path_format option ->
string ->
'a OpamTypes.env_update_op_kind ->
string ->
(OpamTypes.spf_unresolved, 'a) OpamTypes.env_updateval string_of_path_format : OpamTypes.path_format -> stringval char_of_separator : OpamTypes.separator -> charval switch_selections_compare :
OpamTypes.switch_selections ->
OpamTypes.switch_selections ->
intComparators *
val switch_selections_equal :
OpamTypes.switch_selections ->
OpamTypes.switch_selections ->
boolval simple_arg_equal : OpamTypes.simple_arg -> OpamTypes.simple_arg -> boolval arg_equal : OpamTypes.arg -> OpamTypes.arg -> boolval filter_equal : OpamTypes.filter -> OpamTypes.filter -> boolval command_equal : OpamTypes.command -> OpamTypes.command -> bool