diff options
| author | Thomas Bauereiss | 2017-11-08 16:27:49 +0000 |
|---|---|---|
| committer | Thomas Bauereiss | 2017-11-08 16:27:49 +0000 |
| commit | 16272e084d118c1b72d7921455d023aaafbf3dd5 (patch) | |
| tree | c982bbc3748a56e230880e54e57380bbdb2a049a /src/util.mli | |
| parent | 275ded17e9d0824a932fe23607fe4f7d7b1da62f (diff) | |
Allow functions to be selectively declared external only for some backends
For example,
val test = { ocaml: "test_ocaml" } : unit -> unit
will only be external for OCaml. For other backends, it will have to be
defined.
Diffstat (limited to 'src/util.mli')
| -rw-r--r-- | src/util.mli | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.mli b/src/util.mli index 11588de2..a7818f93 100644 --- a/src/util.mli +++ b/src/util.mli @@ -90,6 +90,10 @@ val option_binop : ('a -> 'a -> 'a) -> 'a option -> 'a option -> 'a option whereas [option_get_exn exn (Some x)] returns [x]. *) val option_get_exn : exn -> 'a option -> 'a +(** [option_these xs] extracts the elements of the list [xs] + wrapped in [Some]. *) +val option_these : 'a option list -> 'a list + (** [changed2 f g x h y] applies [g] to [x] and [h] to [y]. If both function applications return [None], then [None] is returned. Otherwise [f] is applied to the results. For this |
