Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ded85826 authored by Andrei Paskevich's avatar Andrei Paskevich Committed by François Bobot
Browse files

simplify module specifications

parent 546bdf13
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ and origin =
| Fresh
module Mid : Map.S with type key = ident
module Sid : Map.SetS with type elt = ident and type t = unit Mid.t
module Sid : Mid.SetS
module Hid : Hashtbl.S with type key = ident
val id_equal : ident -> ident -> bool
......
......@@ -93,7 +93,8 @@ module type S =
val mapi_fold:
(key -> 'a -> 'acc -> 'acc * 'b) -> 'a t -> 'acc -> 'acc * 'b t
module Set : SetS with type elt = key and type t = unit t
module type SetS = SetS with type elt = key and type t = unit t
module Set : SetS
end
......@@ -469,6 +470,8 @@ module Make(Ord: OrderedType) = struct
let acc,r' = mapi_fold f r acc in
acc,Node(l', v, d', r', h)
module type SetS = SetS with type elt = key and type t = unit t
module Set =
struct
type elt = Ord.t
......
......@@ -344,14 +344,15 @@ module type S =
(key -> 'a -> 'acc -> 'acc * 'b)-> 'a t -> 'acc -> 'acc * 'b t
(** fold and map at the same time *)
module Set : SetS with type elt = key and type t = unit t
module type SetS = SetS with type elt = key and type t = unit t
module Set : SetS
end
(** Output signature of the functor {!Map.Make}. *)
module Make (Ord : OrderedType) : S with
type key = Ord.t and type Set.elt = Ord.t
module Make (Ord : OrderedType) : S with type key = Ord.t
(** Functor building an implementation of the map/set structure
given a totally ordered type. *)
......
......@@ -120,14 +120,14 @@ module OrderedHashList (X : Tagged) : OrderedHash with type t = X.t list
module StructMake (X : Tagged) :
sig
module M : Map.S with type key = X.t
module S : Map.SetS with type elt = X.t and type t = unit M.t
module S : M.SetS
module H : Hashtbl.S with type key = X.t
end
module WeakStructMake (X : Hashweak.Weakey) :
sig
module M : Map.S with type key = X.t
module S : Map.SetS with type elt = X.t and type t = unit M.t
module S : M.SetS
module H : Hashtbl.S with type key = X.t
module W : Hashweak.S with type key = X.t
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment