semilattices-0.0.0.2: Semilattices

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 FieldsgetOrder :: a
Instances
 Source # Instance detailsDefined in Data.Semilattice.Order Methodsfmap :: (a -> b) -> Order a -> Order b #(<\$) :: a -> Order b -> Order a # Source # Instance detailsDefined in Data.Semilattice.Order Methodsfold :: 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 #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 # Source # Instance detailsDefined in Data.Semilattice.Order Methodstraverse :: 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) # Bounded a => Bounded (Order a) Source # Instance detailsDefined in Data.Semilattice.Order Methods Enum a => Enum (Order a) Source # Instance detailsDefined in Data.Semilattice.Order Methodssucc :: 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] # Eq a => Eq (Order a) Source # Instance detailsDefined in Data.Semilattice.Order Methods(==) :: Order a -> Order a -> Bool #(/=) :: Order a -> Order a -> Bool # Num a => Num (Order a) Source # Instance detailsDefined 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 # Ord a => Ord (Order a) Source # Instance detailsDefined in Data.Semilattice.Order Methodscompare :: 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 # Read a => Read (Order a) Source # Instance detailsDefined in Data.Semilattice.Order MethodsreadsPrec :: Int -> ReadS (Order a) #readList :: ReadS [Order a] # Show a => Show (Order a) Source # Instance detailsDefined in Data.Semilattice.Order MethodsshowsPrec :: Int -> Order a -> ShowS #show :: Order a -> String #showList :: [Order a] -> ShowS # Lower a => Lower (Order a) Source # Instance detailsDefined in Data.Semilattice.Order Methods Ord a => Join (Order a) Source # Total Orderings give rise to a join semilattice satisfying:Idempotence:Order x \/ Order x == Order xAssociativity:Order a \/ (Order b \/ Order c) == (Order a \/ Order b) \/ Order cCommutativity:Order a \/ Order b == Order b \/ Order aIdentity: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 detailsDefined in Data.Semilattice.Order Methods(\/) :: Order a -> Order a -> Order a Source # Upper a => Upper (Order a) Source # Instance detailsDefined in Data.Semilattice.Order Methods Ord a => Meet (Order a) Source # Total Orderings give rise to a meet semilattice satisfying:Idempotence:Order x /\ Order x == Order xAssociativity:Order a /\ (Order b /\ Order c) == (Order a /\ Order b) /\ Order cCommutativity:Order a /\ Order b == Order b /\ Order aIdentity: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 detailsDefined in Data.Semilattice.Order Methods(/\) :: Order a -> Order a -> Order a Source #
>>> import Test.QuickCheck