ron-0.12: RON
Safe HaskellSafe-Inferred
LanguageHaskell2010

RON.Semilattice

Synopsis

Documentation

class Semigroup a => Semilattice a where Source #

A semilattice.

It may be a join-semilattice, or meet-semilattice, it doesn't matter.

If it matters for you, use package lattices.

In addition to Semigroup, Semilattice defines these laws:

commutativity
x <> y == y <> x
idempotency
x <> x == x
relation-operation equivalence

x y == (x <> y == y) x <> y == minimum z -> x z && y z

Minimal complete definition

Nothing

Methods

(≼) :: a -> a -> Bool Source #

Semilattice relation.

default (≼) :: Eq a => a -> a -> Bool Source #

Instances

Instances details
Semilattice a => Semilattice (Maybe a) Source # 
Instance details

Defined in RON.Semilattice

Methods

(≼) :: Maybe a -> Maybe a -> Bool Source #

Ord a => Semilattice (Max a) Source # 
Instance details

Defined in RON.Semilattice

Methods

(≼) :: Max a -> Max a -> Bool Source #

Ord a => Semilattice (Set a) Source # 
Instance details

Defined in RON.Semilattice

Methods

(≼) :: Set a -> Set a -> Bool Source #

type BoundedSemilattice a = (Monoid a, Semilattice a) Source #

A bounded semilattice.

Bounded semilattice laws are already defined by Monoid and Semilattice, so we don't define an explicit class here.