package opam-format

  1. Overview
  2. Docs

Module OpamTypesBaseSource

Helper functions on the base types (from OpamTypes)

This module contains basic utility functions and stringifiers for the basic OPAM types present in OpamTypes.ml

include module type of struct include OpamCompat end
Sourcemodule String = OpamCompat.String
Sourcemodule Char = OpamCompat.Char
Sourcemodule Either = OpamCompat.Either
Sourcemodule Printexc = OpamCompat.Printexc
module Unix = OpamCompat.Unix
Sourcemodule Uchar = OpamCompat.Uchar
Sourcemodule Buffer = OpamCompat.Buffer
Sourcemodule Filename = OpamCompat.Filename
Sourcemodule Result = OpamCompat.Result
Sourcemodule Lazy = OpamCompat.Lazy
Sourceval string_of_std_path : OpamTypes.std_path -> string
Sourceval std_path_of_string : string -> OpamTypes.std_path
Sourceval all_std_paths : OpamTypes.std_path list
Sourceval action_contents : [< 'a OpamTypes.action ] -> 'a

Extract a package from a package action.

Sourceval map_atomic_action : ('a -> 'b) -> 'a OpamTypes.atomic_action -> 'b OpamTypes.atomic_action
Sourceval map_highlevel_action : ('a -> 'b) -> 'a OpamTypes.highlevel_action -> 'b OpamTypes.highlevel_action
Sourceval map_concrete_action : ('a -> 'b) -> 'a OpamTypes.concrete_action -> 'b OpamTypes.concrete_action
Sourceval map_action : ('a -> 'b) -> 'a OpamTypes.action -> 'b OpamTypes.action
Sourceval full_action_contents : 'a OpamTypes.action -> 'a list

Extract a packages from a package action. This returns all concerned packages, including the old version for an up/down-grade.

Sourceval string_of_cause : ('pkg -> string) -> 'pkg OpamTypes.cause -> string

Pretty-prints the cause of an action

Sourceval string_of_shell : OpamTypes.shell -> string

Pretty-print

The empty file position

Sourceval nullify_pos : 'a -> 'a OpamParserTypes.FullPos.with_pos

pos_best pos1 pos2 returns the most detailed position between pos1 and pos2 (defaulting to pos1)

Position in the given file, with unspecified line and column

Sourceval string_of_pos : OpamParserTypes.FullPos.pos -> string

Prints a file position

Sourceval string_of_user_action : OpamTypes.user_action -> string
Sourceval env_array : OpamTypes.env -> string array

Makes sure to keep only the last binding for a given variable; doesn't preserve order

Sourceval filter_ident_of_string : string -> OpamTypes.name option list * OpamTypes.variable * (string * string) option

Parses the data suitable for a filter.FIdent from a string. May raise Failure msg on bad package names. A self-reference _ parses to None

Sourceval string_of_filter_ident : (OpamTypes.name option list * OpamTypes.variable * (string * string) option) -> string
Sourceval pkg_flag_of_string : string -> OpamTypes.package_flag
Sourceval string_of_pkg_flag : OpamTypes.package_flag -> string
Sourceval all_package_flags : OpamTypes.package_flag list
Sourceval map_success : ('a -> 'b) -> ('a, 'fail) OpamTypes.result -> ('b, 'fail) OpamTypes.result

Map on a solver result

Sourceval iter_success : ('a -> unit) -> ('a, 'b) OpamTypes.result -> unit
OCaml

Innovation. Community. Security.