search for: d8f63d5

Displaying 2 results from an estimated 2 matches for "d8f63d5".

2015 Nov 10
7
[PATCH 0/4]: mllib: Add 'may' function, and refactoring.
The 'may' function is a higher-order function (HOF) that replaces: match x with | None -> () | Some x -> f x with: may f x The idea comes from lablgtk (OCaml Gtk bindings) where it is widely used. If this change is clearer than previous code, then this could be used in many more places. However I previously steered clear from using HOFs like this because they can be
2015 Nov 10
0
[PATCH 4/4] mllib, v2v: Allow open_guestfs to set the handle identifier.
...= let g = new Guestfs.guestfs () in if trace () then g#set_trace true; if verbose () then g#set_verbose true; + may g#set_identifier identifier; g (* All the OCaml virt-* programs use this wrapper to catch exceptions diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index d8f63d5..44b8c93 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -152,7 +152,7 @@ val warning : ('a, unit, string, unit) format4 -> 'a val info : ('a, unit, string, unit) format4 -> 'a (** Standard info function. Note: Use full sentences for this. *) -val open...