[sledge] Update containers to 3.4

Reviewed By: ngorogiannis

Differential Revision: D28269453

fbshipit-source-id: 9224591ab
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent b7b7e89159
commit ac3ec112e8

@ -12,7 +12,7 @@ depends: [
"ocaml" {>= "4.12.0"}
"apron" {>= "v0.9.13"}
"base"
"containers"
"containers" {>= "3.4"}
"containers-data"
"conf-llvm" {= "11.0.0"}
"core" {>= "v0.14"}

@ -39,7 +39,7 @@ let pop seq =
let find_map seq ~f = find_map ~f seq
let find seq ~f = find (CCOpt.if_ f) seq
let find_exn seq ~f = CCOpt.get_exn (find ~f seq)
let find_exn seq ~f = CCOpt.get_exn_or "Iter.find_exn" (find ~f seq)
let fold seq init ~f = fold ~f:(fun s x -> f x s) ~init seq
let contains_dup (type elt) seq ~cmp =

@ -15,6 +15,7 @@ let pp fmt pp_elt fs = function
| Some x -> Format.fprintf fs fmt pp_elt x
| None -> ()
let get_exn = function Some x -> x | None -> invalid_arg "Option.get_exn"
let map_or xo ~default ~f = map_or ~default f xo
let flat_map xo ~f = flat_map f xo
let iter xo ~f = iter f xo

@ -15,6 +15,7 @@ type 'a t = 'a option [@@deriving compare, equal, hash, sexp]
include Monad_intf.S with type 'a t := 'a t
val get_exn : 'a t -> 'a
val pp : ('a_pp -> 'a -> unit, unit) fmt -> 'a_pp -> 'a option pp
val map_or : 'a t -> default:'b -> f:('a -> 'b) -> 'b
val flat_map : 'a t -> f:('a -> 'b t) -> 'b t

Loading…
Cancel
Save