diff options
author | Pierre Boutillier <pierre.boutillier@ens-lyon.org> | 2014-12-14 12:01:59 +0100 |
---|---|---|
committer | Pierre Boutillier <pierre.boutillier@ens-lyon.org> | 2014-12-14 23:38:21 +0100 |
commit | ab1e5d1f9180daa64924b0b398300cd311611045 (patch) | |
tree | c07439bb0f5d1d7709603bce6a448cce5af97c7f | |
parent | 2db658105f8ed20ca2153271b339c777b79da406 (diff) |
Util.un_op -> Option.default
-rw-r--r-- | lib/util.ml | 5 | ||||
-rw-r--r-- | lib/util.mli | 4 | ||||
-rw-r--r-- | toplevel/vernacentries.ml | 2 |
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) |