lattices-1.6.0: Fine-grained library for constructing and manipulating lattices

Copyright (C) 2010-2015 Maximilian Bolingbroke 2015 Oleg Grenrus BSD-3-Clause (see the file LICENSE) Oleg Grenrus Safe Haskell2010

Algebra.Lattice.Lexicographic

Description

Synopsis

# 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.

Constructors

 Lexicographic !k !v

Instances