summaryrefslogtreecommitdiff
path: root/src/util.mli
diff options
context:
space:
mode:
authorThomas Bauereiss2017-11-08 16:27:49 +0000
committerThomas Bauereiss2017-11-08 16:27:49 +0000
commit16272e084d118c1b72d7921455d023aaafbf3dd5 (patch)
treec982bbc3748a56e230880e54e57380bbdb2a049a /src/util.mli
parent275ded17e9d0824a932fe23607fe4f7d7b1da62f (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.mli4
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