module Extlib:Useful operations.sig
..end
This module does not depend of any of frama-c module.
Consult the Plugin Development Guide for additional details.
val nop : 'a -> unit
val find_or_none : ('a -> 'b) -> 'a -> 'b option
val adapt_filename : string -> string
val max_cpt : int -> int -> int
exception NotYetImplemented of string
val not_yet_implemented : string -> 'a
NotYetImplemented
with the given string.val mk_fun : string -> ('a -> 'b) Pervasives.ref
NotYetImplemented
if it is called).val deprecated : string -> now:string -> ('a -> 'b) -> 'a -> 'b
deprecated s ~now f
indicates that the use of f
of name s
is now
deprecated. It should be replaced by now
.val ($) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
val swap : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
val as_singleton : 'a list -> 'a
Invalid_argument
on a non singleton list.val filter_out : ('a -> bool) -> 'a list -> 'a list
val product : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
product f l1 l2
applies f
to all the pairs of an elt of l1
and
an element of l2
.val may : ('a -> unit) -> 'a option -> unit
val may_map : ('a -> 'b) -> ?dft:'b -> 'a option -> 'b
may_map f ?dft x
applies f
to the value of x
if exists. Otherwise
returns the default value dft
.
Assume that either x
or dft
is defined.val opt_map : ('a -> 'b) -> 'a option -> 'b option
val opt_filter : ('a -> bool) -> 'a option -> 'a option
val the : 'a option -> 'a
Invalid_argument
if the value is none.val getperfcount : unit -> int
val getperfcount1024 : unit -> int
val address_of_value : 'a -> int
val try_finally : finally:(unit -> unit) -> ('a -> 'b) -> 'a -> 'b
val full_command : string ->
string array ->
stdin:Unix.file_descr ->
stdout:Unix.file_descr -> stderr:Unix.file_descr -> int