package lrgrep
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=e53de12e4c5cbe6bca00643593266b4f9fa2e3f6a138195eeff7a4329f5c1c75
sha512=7fd7c4d11506fea7cc11c9bbf5aea9142d905643553c0c90e1bb16b794106b0c14a266acf89ae91b6929008dc0ba6515f788642873e2e4ba6c3d49bd45d25127
doc/fix/Fix/Glue/index.html
Module Fix.GlueSource
This module contains glue code that helps use the functors provided by other modules. In particular, it helps build various implementations of association maps.
Types
Ordered and Hashed Types
TrivialOrderedType equips an arbitrary type with an ordering function, just by using OCaml's built-in generic comparison function.
TrivialHashedType equips an arbitrary type with equality and hash functions, just by using OCaml's built-in generic equality and hash functions.
Exploiting Injections
If there is an injection of t into u, then an ordering on u gives rise to an ordering on t.
If there is an injection of t into u, then a hashed-type structure on u can be transported to t.
If there is an injection of t into u, then an implementation of minimal imperative maps for the type u can be transported to the type t.
module InjectImperativeMaps
(M : sig ... end)
(I : sig ... end)
(J : sig ... end) :
sig ... endIf there is an injection of t into u, and if the inverse mapping can be effectively computed, then an implementation of imperative maps for the type u can be transported to the type t.
Maps
An implementation of persistent maps can be made to satisfy the interface of imperative maps. An imperative map is represented as a persistent map, wrapped within a reference cell.
An implementation of imperative maps as arrays is possible if keys are consecutive integers.
An implementation of imperative maps as a hash table.
An implementation of imperative maps as a weak hash table. Use with caution: this table can forget some of its entries, and can therefore be unsuitable for use in some applications.
Semi-Lattices
MinimalSemiLattice converts a semi-lattice to a minimal semi-lattice; that is, it implements leq_join in terms of separate leq and join operations.