Safe Haskell | None |
---|---|

Language | Haskell2010 |

# Documentation

A join semilattice is an idempotent commutative semigroup.

(\/) :: s -> s -> s infixr 6 #

The join operation.

Laws:

Idempotence:

`x ``\/`

x = x

Associativity:

a`\/`

(b`\/`

c) = (a`\/`

b)`\/`

c

Commutativity:

a`\/`

b = b`\/`

a

Additionally, if `s`

has a `Lower`

bound, then `lowerBound`

must be its identity:

`lowerBound`

`\/`

a = a a`\/`

`lowerBound`

= a

If `s`

has an `Upper`

bound, then `upperBound`

must be its absorbing element:

`upperBound`

`\/`

a =`upperBound`

a`\/`

`upperBound`

=`upperBound`

## Instances

Join Bool | Boolean disjunction forms a semilattice. Idempotence: x \/ x == (x :: Bool) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: Bool) Commutativity: a \/ b == b \/ (a :: Bool) Identity: lowerBound \/ a == (a :: Bool) Absorption: upperBound \/ a == (upperBound :: Bool) |

Join Ordering | Orderings form a semilattice. Idempotence: x \/ x == (x :: Ordering) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: Ordering) Commutativity: a \/ b == b \/ (a :: Ordering) Identity: lowerBound \/ a == (a :: Ordering) Absorption: upperBound \/ a == (upperBound :: Ordering) |

Join () | |

Defined in Data.Semilattice.Join | |

Join IntSet | IntSet union forms a semilattice. Idempotence: x \/ x == (x :: IntSet) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: IntSet) Commutativity: a \/ b == b \/ (a :: IntSet) Identity: lowerBound \/ a == (a :: IntSet) |

Ord a => Join (Max a) | The least upperBound bound gives rise to a join semilattice. Idempotence: x \/ x == (x :: Max Int) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: Max Int) Commutativity: a \/ b == b \/ (a :: Max Int) Identity: lowerBound \/ a == (a :: Max Int) Absorption: upperBound \/ a == (upperBound :: Max Int) |

Join a => Join (IntMap a) | IntMap union with Idempotence: x \/ x == (x :: IntMap (Set Char)) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: IntMap (Set Char)) Commutativity: a \/ b == b \/ (a :: IntMap (Set Char)) Identity: lowerBound \/ a == (a :: IntMap (Set Char)) |

Ord a => Join (Set a) | Set union forms a semilattice. Idempotence: x \/ x == (x :: Set Char) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: Set Char) Commutativity: a \/ b == b \/ (a :: Set Char) Identity: lowerBound \/ a == (a :: Set Char) |

(Eq a, Hashable a) => Join (HashSet a) | HashSet union forms a semilattice. Idempotence: x \/ x == (x :: HashSet Char) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: HashSet Char) Commutativity: a \/ b == b \/ (a :: HashSet Char) Identity: lowerBound \/ a == (a :: HashSet Char) |

Ord a => Join (Order a) | Total Idempotence: Order x \/ Order x == Order x Associativity: Order a \/ (Order b \/ Order c) == (Order a \/ Order b) \/ Order c Commutativity: Order a \/ Order b == Order b \/ Order a Identity: lowerBound \/ Order a == Order (a :: Int) Absorption: upperBound \/ Order a == (upperBound :: Order Int) Distributivity: Order a \/ Order b /\ Order c == (Order a \/ Order b) /\ (Order a \/ Order c) |

Join a => Join (Joining a) | |

Join a => Join (LessThan a) | |

Join b => Join (a -> b) | Functions with semilattice codomains form a semilattice. Idempotence: \ (Fn x) -> x \/ x ~= (x :: Int -> Bool) Associativity: \ (Fn a) (Fn b) (Fn c) -> a \/ (b \/ c) ~= (a \/ b) \/ (c :: Int -> Bool) Commutativity: \ (Fn a) (Fn b) -> a \/ b ~= b \/ (a :: Int -> Bool) Identity: \ (Fn a) -> lowerBound \/ a ~= (a :: Int -> Bool) Absorption: \ (Fn a) -> upperBound \/ a ~= (upperBound :: Int -> Bool) |

Defined in Data.Semilattice.Join | |

(Eq k, Hashable k, Join a) => Join (HashMap k a) | HashMap union with Idempotence: x \/ x == (x :: HashMap Char (Set Char)) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: HashMap Char (Set Char)) Commutativity: a \/ b == b \/ (a :: HashMap Char (Set Char)) Identity: lowerBound \/ a == (a :: HashMap Char (Set Char)) |

(Ord k, Join a) => Join (Map k a) | Map union with Idempotence: x \/ x == (x :: Map Char (Set Char)) Associativity: a \/ (b \/ c) == (a \/ b) \/ (c :: Map Char (Set Char)) Commutativity: a \/ b == b \/ (a :: Map Char (Set Char)) Identity: lowerBound \/ a == (a :: Map Char (Set Char)) |

A meet semilattice is an idempotent commutative semigroup.

(/\) :: s -> s -> s infixr 7 #

The meet operation.

Laws:

Idempotence:

`x ``/\`

x = x

Associativity:

a`/\`

(b`/\`

c) = (a`/\`

b)`/\`

c

Commutativity:

a`/\`

b = b`/\`

a

Additionally, if `s`

has an `Upper`

bound, then `upperBound`

must be its identity:

`upperBound`

`/\`

a = a a`/\`

`upperBound`

= a

If `s`

has a `Lower`

bound, then `lowerBound`

must be its absorbing element:

`lowerBound`

`/\`

a =`lowerBound`

a`/\`

`lowerBound`

=`lowerBound`

## Instances

Meet Bool | Boolean conjunction forms a semilattice. Idempotence: x /\ x == (x :: Bool) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: Bool) Commutativity: a /\ b == b /\ (a :: Bool) Identity: upperBound /\ a == (a :: Bool) Absorption: lowerBound /\ a == (lowerBound :: Bool) |

Meet Ordering | Orderings form a semilattice. Idempotence: x /\ x == (x :: Ordering) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: Ordering) Commutativity: a /\ b == b /\ (a :: Ordering) Identity: upperBound /\ a == (a :: Ordering) Absorption: lowerBound /\ a == (lowerBound :: Ordering) |

Meet () | |

Defined in Data.Semilattice.Meet | |

Meet IntSet | IntSet intersection forms a semilattice. Idempotence: x /\ x == (x :: IntSet) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: IntSet) Commutativity: a /\ b == b /\ (a :: IntSet) Absorption: lowerBound /\ a == (lowerBound :: IntSet) |

Ord a => Meet (Min a) | The greatest lowerBound bound gives rise to a meet semilattice. Idempotence: x /\ x == (x :: Min Int) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: Min Int) Commutativity: a /\ b == b /\ (a :: Min Int) Identity: upperBound /\ a == (a :: Min Int) Absorption: lowerBound /\ a == (lowerBound :: Min Int) |

Meet a => Meet (IntMap a) | IntMap union with Idempotence: x /\ x == (x :: IntMap (Set Char)) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: IntMap (Set Char)) Commutativity: a /\ b == b /\ (a :: IntMap (Set Char)) Absorption: lowerBound /\ a == (lowerBound :: IntMap (Set Char)) |

Ord a => Meet (Set a) | Set intersection forms a semilattice. Idempotence: x /\ x == (x :: Set Char) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: Set Char) Commutativity: a /\ b == b /\ (a :: Set Char) Absorption: lowerBound /\ a == (lowerBound :: Set Char) |

(Eq a, Hashable a) => Meet (HashSet a) | HashSet intersection forms a semilattice. Idempotence: x /\ x == (x :: HashSet Char) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: HashSet Char) Commutativity: a /\ b == b /\ (a :: HashSet Char) Absorption: lowerBound /\ a == (lowerBound :: HashSet Char) |

Ord a => Meet (Order a) | Total Idempotence: Order x /\ Order x == Order x Associativity: Order a /\ (Order b /\ Order c) == (Order a /\ Order b) /\ Order c Commutativity: Order a /\ Order b == Order b /\ Order a Identity: upperBound /\ Order a == Order (a :: Int) Absorption: lowerBound /\ Order a == (lowerBound :: Order Int) Distributivity: Order a /\ (Order b \/ Order c) == Order a /\ Order b \/ Order a /\ Order c |

Meet a => Meet (Meeting a) | |

Meet a => Meet (GreaterThan a) | |

Defined in Data.Semilattice.Meet (/\) :: GreaterThan a -> GreaterThan a -> GreaterThan a # | |

Meet b => Meet (a -> b) | Functions with semilattice codomains form a semilattice. Idempotence: \ (Fn x) -> x /\ x ~= (x :: Int -> Bool) Associativity: \ (Fn a) (Fn b) (Fn c) -> a /\ (b /\ c) ~= (a /\ b) /\ (c :: Int -> Bool) Commutativity: \ (Fn a) (Fn b) -> a /\ b ~= b /\ (a :: Int -> Bool) Identity: \ (Fn a) -> upperBound /\ a ~= (a :: Int -> Bool) Absorption: \ (Fn a) -> lowerBound /\ a ~= (lowerBound :: Int -> Bool) |

Defined in Data.Semilattice.Meet | |

(Eq k, Hashable k, Meet a) => Meet (HashMap k a) | HashMap union with Idempotence: x /\ x == (x :: HashMap Char (Set Char)) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: HashMap Char (Set Char)) Commutativity: a /\ b == b /\ (a :: HashMap Char (Set Char)) Absorption: lowerBound /\ a == (lowerBound :: HashMap Char (Set Char)) |

(Ord k, Meet a) => Meet (Map k a) | Map union with Idempotence: x /\ x == (x :: Map Char (Set Char)) Associativity: a /\ (b /\ c) == (a /\ b) /\ (c :: Map Char (Set Char)) Commutativity: a /\ b == b /\ (a :: Map Char (Set Char)) Absorption: lowerBound /\ a == (lowerBound :: Map Char (Set Char)) |

## Instances

Functor Order | |

Foldable Order | |

Defined in Data.Semilattice.Order fold :: Monoid m => Order m -> m # foldMap :: Monoid m => (a -> m) -> Order a -> m # foldr :: (a -> b -> b) -> b -> Order a -> b # foldr' :: (a -> b -> b) -> b -> Order a -> b # foldl :: (b -> a -> b) -> b -> Order a -> b # foldl' :: (b -> a -> b) -> b -> Order a -> b # foldr1 :: (a -> a -> a) -> Order a -> a # foldl1 :: (a -> a -> a) -> Order a -> a # elem :: Eq a => a -> Order a -> Bool # maximum :: Ord a => Order a -> a # minimum :: Ord a => Order a -> a # | |

Traversable Order | |

Bounded a => Bounded (Order a) | |

Enum a => Enum (Order a) | |

Eq a => Eq (Order a) | |

Num a => Num (Order a) | |

Ord a => Ord (Order a) | |

Read a => Read (Order a) | |

Show a => Show (Order a) | |

Ord a => Meet (Order a) | Total Idempotence: Order x /\ Order x == Order x Associativity: Order a /\ (Order b /\ Order c) == (Order a /\ Order b) /\ Order c Commutativity: Order a /\ Order b == Order b /\ Order a Identity: upperBound /\ Order a == Order (a :: Int) Absorption: lowerBound /\ Order a == (lowerBound :: Order Int) Distributivity: Order a /\ (Order b \/ Order c) == Order a /\ Order b \/ Order a /\ Order c |

Upper a => Upper (Order a) | |

Defined in Data.Semilattice.Order upperBound :: Order a # | |

Ord a => Join (Order a) | Total Idempotence: Order x \/ Order x == Order x Associativity: Order a \/ (Order b \/ Order c) == (Order a \/ Order b) \/ Order c Commutativity: Order a \/ Order b == Order b \/ Order a Identity: lowerBound \/ Order a == Order (a :: Int) Absorption: upperBound \/ Order a == (upperBound :: Order Int) Distributivity: Order a \/ Order b /\ Order c == (Order a \/ Order b) /\ (Order a \/ Order c) |

Lower a => Lower (Order a) | |

Defined in Data.Semilattice.Order lowerBound :: Order a # |