feat(sigs): add some basic sigs

This commit is contained in:
Simon Cruanes 2022-07-27 22:40:46 -04:00
parent 2db3343bcd
commit 88eb2575c3
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -39,6 +39,12 @@ module type EQ_ORD_HASH_PRINT = sig
include PRINT with type t := t include PRINT with type t := t
end end
module type EQ_ORD_HASH = sig
include EQ
include ORD with type t := t
include HASH with type t := t
end
module type DYN_BACKTRACKABLE = sig module type DYN_BACKTRACKABLE = sig
val n_levels : unit -> int val n_levels : unit -> int
(** Number of levels *) (** Number of levels *)
@ -82,3 +88,11 @@ module type BACKTRACKABLE1_CB = sig
val pop_levels : 'a t -> int -> f:('a -> unit) -> unit val pop_levels : 'a t -> int -> f:('a -> unit) -> unit
(** [pop_levels st n ~f] removes [n] levels, calling [f] on every removed item *) (** [pop_levels st n ~f] removes [n] levels, calling [f] on every removed item *)
end end
module type WITH_SET_MAP_TBL = sig
type t
module Set : CCSet.S with type elt = t
module Map : CCMap.S with type key = t
module Tbl : CCHashtbl.S with type key = t
end