aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/util.ml5
-rw-r--r--lib/util.mli4
-rw-r--r--toplevel/vernacentries.ml2
3 files changed, 1 insertions, 10 deletions
diff --git a/lib/util.ml b/lib/util.ml
index cfb4ebabc..531e4fe7d 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -105,11 +105,6 @@ let app_opt f x =
| Some f -> f x
| None -> x
-let un_opt x default =
- match x with
- | None -> default
- | Some y -> y
-
(* Stream *)
let stream_nth n st =
diff --git a/lib/util.mli b/lib/util.mli
index bcb1b6265..86720fe47 100644
--- a/lib/util.mli
+++ b/lib/util.mli
@@ -89,10 +89,6 @@ val iterate : ('a -> 'a) -> int -> 'a -> 'a
val repeat : int -> ('a -> unit) -> 'a -> unit
val app_opt : ('a -> 'a) option -> 'a -> 'a
-(** [un_opt opt default] returns the content of [opt] if possible and
- default otherwise. *)
-val un_opt : 'a option -> 'a -> 'a
-
(** {6 Delayed computations. } *)
type 'a delayed = unit -> 'a
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index 3d5fa57bb..33428af02 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -1612,7 +1612,7 @@ let interp_search_about_item env =
as an identifier component")
let vernac_search s gopt r =
- let g = un_opt gopt 1 in
+ let g = Option.default 1 gopt in
let r = interp_search_restriction r in
let env =
try snd (Pfedit.get_goal_context g)