Copyright | (C) 2010-2015 Maximilian Bolingbroke, 2015 Oleg Grenrus |
---|---|
License | BSD-3-Clause (see the file LICENSE) |
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Safe Haskell | Safe |
Language | Haskell2010 |
- data Lexicographic k v = Lexicographic !k !v
Documentation
data Lexicographic k v Source
A pair lattice with a lexicographic ordering. This means in a join the second component of the resulting pair is the second component of the pair with the larger first component. If the first components are equal, then the second components will be joined. The meet is similar only it prefers the smaller first component.
An application of this type is versioning. For example, a
Last-Writer-Wins register would look like
'Lexicographc (Ordered Timestamp) v' where the lattice
structure handles the, presumably rare, case of matching
Timestamps
. Typically this is done in an arbitary, but
deterministic manner.
Lexicographic !k !v |