Yit Phang Khoo avatar Yit Phang Khoo committed fd5d872

Add Signatures.EqualsType to replace uses of Hashtbl.SeededHashedType when hashing is not needed.

Comments (0)

Files changed (9)

Source/Adapton/EagerSALazy.ml

 include T
 
 (** Functor to make constructors and updaters for lazy self-adjusting values of a specific type. *)
-module Make (R : Hashtbl.SeededHashedType)
+module Make (R : Signatures.EqualsType)
         : Signatures.SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk = struct
     include T
 

Source/Adapton/EagerSATotalOrder.ml

 
 
 (** Functor to make constructors and updaters for eager self-adjusting values of a specific type. *)
-module Make (R : Hashtbl.SeededHashedType)
+module Make (R : Signatures.EqualsType)
         : Signatures.SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk = struct
     include T
 

Source/Adapton/LazySABidi.ml

 
 
 (** Functor to make constructors and updaters for lazy self-adjusting values of a specific type. *)
-module Make (R : Hashtbl.SeededHashedType)
+module Make (R : Signatures.EqualsType)
         : Signatures.SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk = struct
     include T
 

Source/Adapton/LazySABidiObject.ml

 
 
 (** Functor to make a constructor, a mutator, and a memoizing constructor for lazy self-adjusting values of a specific type. *)
-module Make (R : Hashtbl.SeededHashedType)
+module Make (R : Signatures.EqualsType)
         : Signatures.SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk = struct
     include T
 

Source/Adapton/LazySANaive.ml

 
 
 (** Functor to make constructors and updaters for lazy self-adjusting values of a specific type. *)
-module Make (R : Hashtbl.SeededHashedType)
+module Make (R : Signatures.EqualsType)
         : Signatures.SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk = struct
     include T
 

Source/Adapton/LazySAObject.ml

 
 
 (** Functor to make a constructor, a mutator, and a memoizing constructor for lazy self-adjusting values of a specific type. *)
-module Make (R : Hashtbl.SeededHashedType)
+module Make (R : Signatures.EqualsType)
         : Signatures.SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk = struct
     include T
 

Source/Adapton/NonSAEager.ml

 
 
 (** Functor to make constructors and updaters for eager non-self-adjusting values of a specific type. *)
-module Make (R : Hashtbl.SeededHashedType)
+module Make (R : Signatures.EqualsType)
         : Signatures.SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk = struct
     include T
 

Source/Adapton/NonSALazy.ml

 
 
 (** Functor to make constructors and updaters for lazy non-self-adjusting values of a specific type. *)
-module Make (R : Hashtbl.SeededHashedType)
+module Make (R : Signatures.EqualsType)
         : Signatures.SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk = struct
     include T
 

Source/Adapton/Signatures.ml

 (** Module types for {i Adapton}. *)
 
+(** {2 Equals-comparable values *)
+
+module type EqualsType = sig
+    type t
+    val equal : t -> t -> bool
+end
+
 (** {2 Self-adjusting values} *)
 
 (** Output module types of modules for self-adjusting values. *)
     val equal : 'a thunk -> 'a thunk -> bool
     val force : 'a thunk -> 'a
     val refresh : unit -> unit
-    module Make (R : Hashtbl.SeededHashedType) : SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk
+    module Make (R : EqualsType) : SAType.S with type sa = sa and type 'a thunk = 'a thunk and type data = R.t and type t = R.t thunk
 end
 
 (** {2 Self-adjusting lists} *)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.