semilattices-0.0.0.5: Semilattices
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Semilattice.Order

Description

Total Orderings give rise to Join and Meet semilattices.

Synopsis

Documentation

newtype Order a Source #

A Join- and Meet-semilattice for any total Ordering.

Constructors

Order 

Fields

Instances

Instances details
Foldable Order Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

fold :: Monoid m => Order m -> m #

foldMap :: Monoid m => (a -> m) -> Order a -> 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 #

toList :: Order a -> [a] #

null :: Order a -> Bool #

length :: Order a -> Int #

elem :: Eq a => a -> Order a -> Bool #

maximum :: Ord a => Order a -> a #

minimum :: Ord a => Order a -> a #

sum :: Num a => Order a -> a #

product :: Num a => Order a -> a #

Traversable Order Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

traverse :: Applicative f => (a -> f b) -> Order a -> f (Order b) #

sequenceA :: Applicative f => Order (f a) -> f (Order a) #

mapM :: Monad m => (a -> m b) -> Order a -> m (Order b) #

sequence :: Monad m => Order (m a) -> m (Order a) #

Functor Order Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

fmap :: (a -> b) -> Order a -> Order b #

(<$) :: a -> Order b -> Order a #

Bounded a => Bounded (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

minBound :: Order a #

maxBound :: Order a #

Enum a => Enum (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

succ :: Order a -> Order a #

pred :: Order a -> Order a #

toEnum :: Int -> Order a #

fromEnum :: Order a -> Int #

enumFrom :: Order a -> [Order a] #

enumFromThen :: Order a -> Order a -> [Order a] #

enumFromTo :: Order a -> Order a -> [Order a] #

enumFromThenTo :: Order a -> Order a -> Order a -> [Order a] #

Num a => Num (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

(+) :: Order a -> Order a -> Order a #

(-) :: Order a -> Order a -> Order a #

(*) :: Order a -> Order a -> Order a #

negate :: Order a -> Order a #

abs :: Order a -> Order a #

signum :: Order a -> Order a #

fromInteger :: Integer -> Order a #

Read a => Read (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Show a => Show (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

showsPrec :: Int -> Order a -> ShowS #

show :: Order a -> String #

showList :: [Order a] -> ShowS #

Eq a => Eq (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

(==) :: Order a -> Order a -> Bool #

(/=) :: Order a -> Order a -> Bool #

Ord a => Ord (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

compare :: Order a -> Order a -> Ordering #

(<) :: Order a -> Order a -> Bool #

(<=) :: Order a -> Order a -> Bool #

(>) :: Order a -> Order a -> Bool #

(>=) :: Order a -> Order a -> Bool #

max :: Order a -> Order a -> Order a #

min :: Order a -> Order a -> Order a #

Ord a => Join (Order a) Source #

Total Orderings give rise to a join semilattice satisfying:

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)
Instance details

Defined in Data.Semilattice.Order

Methods

(\/) :: Order a -> Order a -> Order a Source #

Lower a => Lower (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

lowerBound :: Order a Source #

Ord a => Meet (Order a) Source #

Total Orderings give rise to a meet semilattice satisfying:

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
Instance details

Defined in Data.Semilattice.Order

Methods

(/\) :: Order a -> Order a -> Order a Source #

Upper a => Upper (Order a) Source # 
Instance details

Defined in Data.Semilattice.Order

Methods

upperBound :: Order a Source #