Module Std.Container


module Container: Container


type ('a, 'b) type_class = {
   length : 'b -> int;
   is_empty : 'b -> bool;
   iter : 'b -> f:('a -> unit) -> unit; (*fold f a [b1; ...; bn] is f (... (f (f a b1) b2) ...) bn.*)
   fold : 'c. 'b -> init:'c -> f:('c -> 'a -> 'c) -> 'c;
   exists : 'b -> f:('a -> bool) -> bool;
   for_all : 'b -> f:('a -> bool) -> bool;
   find : 'b -> f:('a -> bool) -> 'a option;
   to_list : 'b -> 'a list;
   to_array : 'b -> 'a array;
}
type ('a, 'b) fold = {
   f : 'c. 'b -> init:'c -> f:('c -> 'a -> 'c) -> 'c;
}
val create : fold:('a, 'b) fold ->
?length:('b -> int) ->
?is_empty:('b -> bool) ->
?iter:('b -> f:('a -> unit) -> unit) ->
?exists:('b -> f:('a -> bool) -> bool) ->
?for_all:('b -> f:('a -> bool) -> bool) ->
?find:('b -> f:('a -> bool) -> 'a option) ->
?to_list:('b -> 'a list) ->
?to_array:('b -> 'a array) -> unit -> ('a, 'b) type_class
module type S0_noclass = sig .. end
module type S0 = sig .. end
module type S0_phantom_noclass = sig .. end
module type S0_phantom = sig .. end
module type S1_noclass = sig .. end
module type S1 = sig .. end
module type S1_phantom_noclass = sig .. end
module type S1_phantom = sig .. end
module Check: 
functor (T : sig
type 'a elt 
type 'a container 
end) ->
functor (M : sig
val length : 'a T.container -> int
val is_empty : 'a T.container -> bool
val iter : 'a T.container -> f:('a T.elt -> unit) -> unit
val fold : 'a T.container -> init:'b -> f:('b -> 'a T.elt -> 'b) -> 'b
val exists : 'a T.container -> f:('a T.elt -> bool) -> bool
val for_all : 'a T.container -> f:('a T.elt -> bool) -> bool
val find : 'a T.container -> f:('a T.elt -> bool) -> 'a T.elt option
val to_list : 'a T.container -> 'a T.elt list
val to_array : 'a T.container -> 'a T.elt array
end) -> sig .. end
module Check_S0: 
functor (M : S0) -> Check(sig
type 'a elt = M.elt 
type 'a container = M.container 
end)(M)
module Check_S0_phantom: 
functor (M : S0_phantom) -> Check(sig
type 'a elt = M.elt 
type 'a container = 'a M.container 
end)(M)
module Check_S1: 
functor (M : S1) -> Check(sig
type 'a elt = 'a 
type 'a container = 'a M.container 
end)
type phantom 
module Check_S1_phantom: 
functor (M : S1_phantom) -> Check(sig
type 'a elt = 'a 
type 'a container = ('a, Container.phantom) M.container 
end)(M)