{-# LANGUAGE DeriveTraversable, GeneralizedNewtypeDeriving #-}
module Data.Semilattice.Meet
( Meet(..)
, Meeting(..)
, GreaterThan(..)
) where
import Data.HashMap.Lazy as HashMap
import Data.HashSet as HashSet
import Data.IntMap as IntMap
import Data.IntSet as IntSet
import Data.Map as Map
import Data.Semigroup
import Data.Semilattice.Upper
import Data.Set as Set
class Meet s where
(/\) :: s -> s -> s
infixr 7 /\
instance Meet () where
()
_ /\ :: () -> () -> ()
/\ ()
_ = ()
instance Meet Bool where
/\ :: Bool -> Bool -> Bool
(/\) = Bool -> Bool -> Bool
(&&)
instance Meet Ordering where
Ordering
LT /\ :: Ordering -> Ordering -> Ordering
/\ Ordering
_ = Ordering
LT
Ordering
_ /\ Ordering
LT = Ordering
LT
Ordering
GT /\ Ordering
b = Ordering
b
Ordering
a /\ Ordering
GT = Ordering
a
Ordering
_ /\ Ordering
_ = Ordering
EQ
instance Meet b => Meet (a -> b) where
a -> b
f /\ :: (a -> b) -> (a -> b) -> a -> b
/\ a -> b
g = b -> b -> b
forall s. Meet s => s -> s -> s
(/\) (b -> b -> b) -> (a -> b) -> a -> b -> b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> b
f (a -> b -> b) -> (a -> b) -> a -> b
forall a b. (a -> a -> b) -> (a -> a) -> a -> b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> a -> b
g
instance Ord a => Meet (Min a) where
/\ :: Min a -> Min a -> Min a
(/\) = Min a -> Min a -> Min a
forall a. Semigroup a => a -> a -> a
(<>)
instance Meet a => Meet (IntMap a) where
/\ :: IntMap a -> IntMap a -> IntMap a
(/\) = (a -> a -> a) -> IntMap a -> IntMap a -> IntMap a
forall a b c. (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
IntMap.intersectionWith a -> a -> a
forall s. Meet s => s -> s -> s
(/\)
instance Meet IntSet where
/\ :: IntSet -> IntSet -> IntSet
(/\) = IntSet -> IntSet -> IntSet
IntSet.intersection
instance (Ord k, Meet a) => Meet (Map k a) where
/\ :: Map k a -> Map k a -> Map k a
(/\) = (a -> a -> a) -> Map k a -> Map k a -> Map k a
forall k a b c.
Ord k =>
(a -> b -> c) -> Map k a -> Map k b -> Map k c
Map.intersectionWith a -> a -> a
forall s. Meet s => s -> s -> s
(/\)
instance Ord a => Meet (Set a) where
/\ :: Set a -> Set a -> Set a
(/\) = Set a -> Set a -> Set a
forall a. Ord a => Set a -> Set a -> Set a
Set.intersection
instance (Eq k, Meet a) => Meet (HashMap k a) where
/\ :: HashMap k a -> HashMap k a -> HashMap k a
(/\) = (a -> a -> a) -> HashMap k a -> HashMap k a -> HashMap k a
forall k v1 v2 v3.
Eq k =>
(v1 -> v2 -> v3) -> HashMap k v1 -> HashMap k v2 -> HashMap k v3
HashMap.intersectionWith a -> a -> a
forall s. Meet s => s -> s -> s
(/\)
instance Eq a => Meet (HashSet a) where
/\ :: HashSet a -> HashSet a -> HashSet a
(/\) = HashSet a -> HashSet a -> HashSet a
forall a. Eq a => HashSet a -> HashSet a -> HashSet a
HashSet.intersection
newtype Meeting a = Meeting { forall a. Meeting a -> a
getMeeting :: a }
deriving (Meeting a
Meeting a -> Meeting a -> Bounded (Meeting a)
forall a. a -> a -> Bounded a
forall a. Bounded a => Meeting a
$cminBound :: forall a. Bounded a => Meeting a
minBound :: Meeting a
$cmaxBound :: forall a. Bounded a => Meeting a
maxBound :: Meeting a
Bounded, Int -> Meeting a
Meeting a -> Int
Meeting a -> [Meeting a]
Meeting a -> Meeting a
Meeting a -> Meeting a -> [Meeting a]
Meeting a -> Meeting a -> Meeting a -> [Meeting a]
(Meeting a -> Meeting a)
-> (Meeting a -> Meeting a)
-> (Int -> Meeting a)
-> (Meeting a -> Int)
-> (Meeting a -> [Meeting a])
-> (Meeting a -> Meeting a -> [Meeting a])
-> (Meeting a -> Meeting a -> [Meeting a])
-> (Meeting a -> Meeting a -> Meeting a -> [Meeting a])
-> Enum (Meeting a)
forall a. Enum a => Int -> Meeting a
forall a. Enum a => Meeting a -> Int
forall a. Enum a => Meeting a -> [Meeting a]
forall a. Enum a => Meeting a -> Meeting a
forall a. Enum a => Meeting a -> Meeting a -> [Meeting a]
forall a.
Enum a =>
Meeting a -> Meeting a -> Meeting a -> [Meeting a]
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: forall a. Enum a => Meeting a -> Meeting a
succ :: Meeting a -> Meeting a
$cpred :: forall a. Enum a => Meeting a -> Meeting a
pred :: Meeting a -> Meeting a
$ctoEnum :: forall a. Enum a => Int -> Meeting a
toEnum :: Int -> Meeting a
$cfromEnum :: forall a. Enum a => Meeting a -> Int
fromEnum :: Meeting a -> Int
$cenumFrom :: forall a. Enum a => Meeting a -> [Meeting a]
enumFrom :: Meeting a -> [Meeting a]
$cenumFromThen :: forall a. Enum a => Meeting a -> Meeting a -> [Meeting a]
enumFromThen :: Meeting a -> Meeting a -> [Meeting a]
$cenumFromTo :: forall a. Enum a => Meeting a -> Meeting a -> [Meeting a]
enumFromTo :: Meeting a -> Meeting a -> [Meeting a]
$cenumFromThenTo :: forall a.
Enum a =>
Meeting a -> Meeting a -> Meeting a -> [Meeting a]
enumFromThenTo :: Meeting a -> Meeting a -> Meeting a -> [Meeting a]
Enum, Meeting a -> Meeting a -> Bool
(Meeting a -> Meeting a -> Bool)
-> (Meeting a -> Meeting a -> Bool) -> Eq (Meeting a)
forall a. Eq a => Meeting a -> Meeting a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall a. Eq a => Meeting a -> Meeting a -> Bool
== :: Meeting a -> Meeting a -> Bool
$c/= :: forall a. Eq a => Meeting a -> Meeting a -> Bool
/= :: Meeting a -> Meeting a -> Bool
Eq, (forall m. Monoid m => Meeting m -> m)
-> (forall m a. Monoid m => (a -> m) -> Meeting a -> m)
-> (forall m a. Monoid m => (a -> m) -> Meeting a -> m)
-> (forall a b. (a -> b -> b) -> b -> Meeting a -> b)
-> (forall a b. (a -> b -> b) -> b -> Meeting a -> b)
-> (forall b a. (b -> a -> b) -> b -> Meeting a -> b)
-> (forall b a. (b -> a -> b) -> b -> Meeting a -> b)
-> (forall a. (a -> a -> a) -> Meeting a -> a)
-> (forall a. (a -> a -> a) -> Meeting a -> a)
-> (forall a. Meeting a -> [a])
-> (forall a. Meeting a -> Bool)
-> (forall a. Meeting a -> Int)
-> (forall a. Eq a => a -> Meeting a -> Bool)
-> (forall a. Ord a => Meeting a -> a)
-> (forall a. Ord a => Meeting a -> a)
-> (forall a. Num a => Meeting a -> a)
-> (forall a. Num a => Meeting a -> a)
-> Foldable Meeting
forall a. Eq a => a -> Meeting a -> Bool
forall a. Num a => Meeting a -> a
forall a. Ord a => Meeting a -> a
forall m. Monoid m => Meeting m -> m
forall a. Meeting a -> Bool
forall a. Meeting a -> Int
forall a. Meeting a -> [a]
forall a. (a -> a -> a) -> Meeting a -> a
forall m a. Monoid m => (a -> m) -> Meeting a -> m
forall b a. (b -> a -> b) -> b -> Meeting a -> b
forall a b. (a -> b -> b) -> b -> Meeting a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
$cfold :: forall m. Monoid m => Meeting m -> m
fold :: forall m. Monoid m => Meeting m -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Meeting a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> Meeting a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Meeting a -> m
foldMap' :: forall m a. Monoid m => (a -> m) -> Meeting a -> m
$cfoldr :: forall a b. (a -> b -> b) -> b -> Meeting a -> b
foldr :: forall a b. (a -> b -> b) -> b -> Meeting a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Meeting a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> Meeting a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Meeting a -> b
foldl :: forall b a. (b -> a -> b) -> b -> Meeting a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Meeting a -> b
foldl' :: forall b a. (b -> a -> b) -> b -> Meeting a -> b
$cfoldr1 :: forall a. (a -> a -> a) -> Meeting a -> a
foldr1 :: forall a. (a -> a -> a) -> Meeting a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Meeting a -> a
foldl1 :: forall a. (a -> a -> a) -> Meeting a -> a
$ctoList :: forall a. Meeting a -> [a]
toList :: forall a. Meeting a -> [a]
$cnull :: forall a. Meeting a -> Bool
null :: forall a. Meeting a -> Bool
$clength :: forall a. Meeting a -> Int
length :: forall a. Meeting a -> Int
$celem :: forall a. Eq a => a -> Meeting a -> Bool
elem :: forall a. Eq a => a -> Meeting a -> Bool
$cmaximum :: forall a. Ord a => Meeting a -> a
maximum :: forall a. Ord a => Meeting a -> a
$cminimum :: forall a. Ord a => Meeting a -> a
minimum :: forall a. Ord a => Meeting a -> a
$csum :: forall a. Num a => Meeting a -> a
sum :: forall a. Num a => Meeting a -> a
$cproduct :: forall a. Num a => Meeting a -> a
product :: forall a. Num a => Meeting a -> a
Foldable, (forall a b. (a -> b) -> Meeting a -> Meeting b)
-> (forall a b. a -> Meeting b -> Meeting a) -> Functor Meeting
forall a b. a -> Meeting b -> Meeting a
forall a b. (a -> b) -> Meeting a -> Meeting b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> Meeting a -> Meeting b
fmap :: forall a b. (a -> b) -> Meeting a -> Meeting b
$c<$ :: forall a b. a -> Meeting b -> Meeting a
<$ :: forall a b. a -> Meeting b -> Meeting a
Functor, Meeting a -> Meeting a -> Meeting a
(Meeting a -> Meeting a -> Meeting a) -> Meet (Meeting a)
forall a. Meet a => Meeting a -> Meeting a -> Meeting a
forall s. (s -> s -> s) -> Meet s
$c/\ :: forall a. Meet a => Meeting a -> Meeting a -> Meeting a
/\ :: Meeting a -> Meeting a -> Meeting a
Meet, Integer -> Meeting a
Meeting a -> Meeting a
Meeting a -> Meeting a -> Meeting a
(Meeting a -> Meeting a -> Meeting a)
-> (Meeting a -> Meeting a -> Meeting a)
-> (Meeting a -> Meeting a -> Meeting a)
-> (Meeting a -> Meeting a)
-> (Meeting a -> Meeting a)
-> (Meeting a -> Meeting a)
-> (Integer -> Meeting a)
-> Num (Meeting a)
forall a. Num a => Integer -> Meeting a
forall a. Num a => Meeting a -> Meeting a
forall a. Num a => Meeting a -> Meeting a -> Meeting a
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: forall a. Num a => Meeting a -> Meeting a -> Meeting a
+ :: Meeting a -> Meeting a -> Meeting a
$c- :: forall a. Num a => Meeting a -> Meeting a -> Meeting a
- :: Meeting a -> Meeting a -> Meeting a
$c* :: forall a. Num a => Meeting a -> Meeting a -> Meeting a
* :: Meeting a -> Meeting a -> Meeting a
$cnegate :: forall a. Num a => Meeting a -> Meeting a
negate :: Meeting a -> Meeting a
$cabs :: forall a. Num a => Meeting a -> Meeting a
abs :: Meeting a -> Meeting a
$csignum :: forall a. Num a => Meeting a -> Meeting a
signum :: Meeting a -> Meeting a
$cfromInteger :: forall a. Num a => Integer -> Meeting a
fromInteger :: Integer -> Meeting a
Num, Eq (Meeting a)
Eq (Meeting a) =>
(Meeting a -> Meeting a -> Ordering)
-> (Meeting a -> Meeting a -> Bool)
-> (Meeting a -> Meeting a -> Bool)
-> (Meeting a -> Meeting a -> Bool)
-> (Meeting a -> Meeting a -> Bool)
-> (Meeting a -> Meeting a -> Meeting a)
-> (Meeting a -> Meeting a -> Meeting a)
-> Ord (Meeting a)
Meeting a -> Meeting a -> Bool
Meeting a -> Meeting a -> Ordering
Meeting a -> Meeting a -> Meeting a
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Meeting a)
forall a. Ord a => Meeting a -> Meeting a -> Bool
forall a. Ord a => Meeting a -> Meeting a -> Ordering
forall a. Ord a => Meeting a -> Meeting a -> Meeting a
$ccompare :: forall a. Ord a => Meeting a -> Meeting a -> Ordering
compare :: Meeting a -> Meeting a -> Ordering
$c< :: forall a. Ord a => Meeting a -> Meeting a -> Bool
< :: Meeting a -> Meeting a -> Bool
$c<= :: forall a. Ord a => Meeting a -> Meeting a -> Bool
<= :: Meeting a -> Meeting a -> Bool
$c> :: forall a. Ord a => Meeting a -> Meeting a -> Bool
> :: Meeting a -> Meeting a -> Bool
$c>= :: forall a. Ord a => Meeting a -> Meeting a -> Bool
>= :: Meeting a -> Meeting a -> Bool
$cmax :: forall a. Ord a => Meeting a -> Meeting a -> Meeting a
max :: Meeting a -> Meeting a -> Meeting a
$cmin :: forall a. Ord a => Meeting a -> Meeting a -> Meeting a
min :: Meeting a -> Meeting a -> Meeting a
Ord, ReadPrec [Meeting a]
ReadPrec (Meeting a)
Int -> ReadS (Meeting a)
ReadS [Meeting a]
(Int -> ReadS (Meeting a))
-> ReadS [Meeting a]
-> ReadPrec (Meeting a)
-> ReadPrec [Meeting a]
-> Read (Meeting a)
forall a. Read a => ReadPrec [Meeting a]
forall a. Read a => ReadPrec (Meeting a)
forall a. Read a => Int -> ReadS (Meeting a)
forall a. Read a => ReadS [Meeting a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: forall a. Read a => Int -> ReadS (Meeting a)
readsPrec :: Int -> ReadS (Meeting a)
$creadList :: forall a. Read a => ReadS [Meeting a]
readList :: ReadS [Meeting a]
$creadPrec :: forall a. Read a => ReadPrec (Meeting a)
readPrec :: ReadPrec (Meeting a)
$creadListPrec :: forall a. Read a => ReadPrec [Meeting a]
readListPrec :: ReadPrec [Meeting a]
Read, Int -> Meeting a -> ShowS
[Meeting a] -> ShowS
Meeting a -> String
(Int -> Meeting a -> ShowS)
-> (Meeting a -> String)
-> ([Meeting a] -> ShowS)
-> Show (Meeting a)
forall a. Show a => Int -> Meeting a -> ShowS
forall a. Show a => [Meeting a] -> ShowS
forall a. Show a => Meeting a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall a. Show a => Int -> Meeting a -> ShowS
showsPrec :: Int -> Meeting a -> ShowS
$cshow :: forall a. Show a => Meeting a -> String
show :: Meeting a -> String
$cshowList :: forall a. Show a => [Meeting a] -> ShowS
showList :: [Meeting a] -> ShowS
Show, Functor Meeting
Foldable Meeting
(Functor Meeting, Foldable Meeting) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Meeting a -> f (Meeting b))
-> (forall (f :: * -> *) a.
Applicative f =>
Meeting (f a) -> f (Meeting a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Meeting a -> m (Meeting b))
-> (forall (m :: * -> *) a.
Monad m =>
Meeting (m a) -> m (Meeting a))
-> Traversable Meeting
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Meeting (m a) -> m (Meeting a)
forall (f :: * -> *) a.
Applicative f =>
Meeting (f a) -> f (Meeting a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Meeting a -> m (Meeting b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Meeting a -> f (Meeting b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Meeting a -> f (Meeting b)
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Meeting a -> f (Meeting b)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
Meeting (f a) -> f (Meeting a)
sequenceA :: forall (f :: * -> *) a.
Applicative f =>
Meeting (f a) -> f (Meeting a)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Meeting a -> m (Meeting b)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Meeting a -> m (Meeting b)
$csequence :: forall (m :: * -> *) a. Monad m => Meeting (m a) -> m (Meeting a)
sequence :: forall (m :: * -> *) a. Monad m => Meeting (m a) -> m (Meeting a)
Traversable, Meeting a
Meeting a -> Upper (Meeting a)
forall s. s -> Upper s
forall a. Upper a => Meeting a
$cupperBound :: forall a. Upper a => Meeting a
upperBound :: Meeting a
Upper)
instance Meet a => Semigroup (Meeting a) where
<> :: Meeting a -> Meeting a -> Meeting a
(<>) = Meeting a -> Meeting a -> Meeting a
forall s. Meet s => s -> s -> s
(/\)
instance (Upper a, Meet a) => Monoid (Meeting a) where
mappend :: Meeting a -> Meeting a -> Meeting a
mappend = Meeting a -> Meeting a -> Meeting a
forall a. Semigroup a => a -> a -> a
(<>)
mempty :: Meeting a
mempty = Meeting a
forall s. Upper s => s
upperBound
newtype GreaterThan a = GreaterThan { forall a. GreaterThan a -> a
getGreaterThan :: a }
deriving (Int -> GreaterThan a
GreaterThan a -> Int
GreaterThan a -> [GreaterThan a]
GreaterThan a -> GreaterThan a
GreaterThan a -> GreaterThan a -> [GreaterThan a]
GreaterThan a -> GreaterThan a -> GreaterThan a -> [GreaterThan a]
(GreaterThan a -> GreaterThan a)
-> (GreaterThan a -> GreaterThan a)
-> (Int -> GreaterThan a)
-> (GreaterThan a -> Int)
-> (GreaterThan a -> [GreaterThan a])
-> (GreaterThan a -> GreaterThan a -> [GreaterThan a])
-> (GreaterThan a -> GreaterThan a -> [GreaterThan a])
-> (GreaterThan a
-> GreaterThan a -> GreaterThan a -> [GreaterThan a])
-> Enum (GreaterThan a)
forall a. Enum a => Int -> GreaterThan a
forall a. Enum a => GreaterThan a -> Int
forall a. Enum a => GreaterThan a -> [GreaterThan a]
forall a. Enum a => GreaterThan a -> GreaterThan a
forall a.
Enum a =>
GreaterThan a -> GreaterThan a -> [GreaterThan a]
forall a.
Enum a =>
GreaterThan a -> GreaterThan a -> GreaterThan a -> [GreaterThan a]
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: forall a. Enum a => GreaterThan a -> GreaterThan a
succ :: GreaterThan a -> GreaterThan a
$cpred :: forall a. Enum a => GreaterThan a -> GreaterThan a
pred :: GreaterThan a -> GreaterThan a
$ctoEnum :: forall a. Enum a => Int -> GreaterThan a
toEnum :: Int -> GreaterThan a
$cfromEnum :: forall a. Enum a => GreaterThan a -> Int
fromEnum :: GreaterThan a -> Int
$cenumFrom :: forall a. Enum a => GreaterThan a -> [GreaterThan a]
enumFrom :: GreaterThan a -> [GreaterThan a]
$cenumFromThen :: forall a.
Enum a =>
GreaterThan a -> GreaterThan a -> [GreaterThan a]
enumFromThen :: GreaterThan a -> GreaterThan a -> [GreaterThan a]
$cenumFromTo :: forall a.
Enum a =>
GreaterThan a -> GreaterThan a -> [GreaterThan a]
enumFromTo :: GreaterThan a -> GreaterThan a -> [GreaterThan a]
$cenumFromThenTo :: forall a.
Enum a =>
GreaterThan a -> GreaterThan a -> GreaterThan a -> [GreaterThan a]
enumFromThenTo :: GreaterThan a -> GreaterThan a -> GreaterThan a -> [GreaterThan a]
Enum, GreaterThan a -> GreaterThan a -> Bool
(GreaterThan a -> GreaterThan a -> Bool)
-> (GreaterThan a -> GreaterThan a -> Bool) -> Eq (GreaterThan a)
forall a. Eq a => GreaterThan a -> GreaterThan a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall a. Eq a => GreaterThan a -> GreaterThan a -> Bool
== :: GreaterThan a -> GreaterThan a -> Bool
$c/= :: forall a. Eq a => GreaterThan a -> GreaterThan a -> Bool
/= :: GreaterThan a -> GreaterThan a -> Bool
Eq, (forall m. Monoid m => GreaterThan m -> m)
-> (forall m a. Monoid m => (a -> m) -> GreaterThan a -> m)
-> (forall m a. Monoid m => (a -> m) -> GreaterThan a -> m)
-> (forall a b. (a -> b -> b) -> b -> GreaterThan a -> b)
-> (forall a b. (a -> b -> b) -> b -> GreaterThan a -> b)
-> (forall b a. (b -> a -> b) -> b -> GreaterThan a -> b)
-> (forall b a. (b -> a -> b) -> b -> GreaterThan a -> b)
-> (forall a. (a -> a -> a) -> GreaterThan a -> a)
-> (forall a. (a -> a -> a) -> GreaterThan a -> a)
-> (forall a. GreaterThan a -> [a])
-> (forall a. GreaterThan a -> Bool)
-> (forall a. GreaterThan a -> Int)
-> (forall a. Eq a => a -> GreaterThan a -> Bool)
-> (forall a. Ord a => GreaterThan a -> a)
-> (forall a. Ord a => GreaterThan a -> a)
-> (forall a. Num a => GreaterThan a -> a)
-> (forall a. Num a => GreaterThan a -> a)
-> Foldable GreaterThan
forall a. Eq a => a -> GreaterThan a -> Bool
forall a. Num a => GreaterThan a -> a
forall a. Ord a => GreaterThan a -> a
forall m. Monoid m => GreaterThan m -> m
forall a. GreaterThan a -> Bool
forall a. GreaterThan a -> Int
forall a. GreaterThan a -> [a]
forall a. (a -> a -> a) -> GreaterThan a -> a
forall m a. Monoid m => (a -> m) -> GreaterThan a -> m
forall b a. (b -> a -> b) -> b -> GreaterThan a -> b
forall a b. (a -> b -> b) -> b -> GreaterThan a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
$cfold :: forall m. Monoid m => GreaterThan m -> m
fold :: forall m. Monoid m => GreaterThan m -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> GreaterThan a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> GreaterThan a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> GreaterThan a -> m
foldMap' :: forall m a. Monoid m => (a -> m) -> GreaterThan a -> m
$cfoldr :: forall a b. (a -> b -> b) -> b -> GreaterThan a -> b
foldr :: forall a b. (a -> b -> b) -> b -> GreaterThan a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> GreaterThan a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> GreaterThan a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> GreaterThan a -> b
foldl :: forall b a. (b -> a -> b) -> b -> GreaterThan a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> GreaterThan a -> b
foldl' :: forall b a. (b -> a -> b) -> b -> GreaterThan a -> b
$cfoldr1 :: forall a. (a -> a -> a) -> GreaterThan a -> a
foldr1 :: forall a. (a -> a -> a) -> GreaterThan a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> GreaterThan a -> a
foldl1 :: forall a. (a -> a -> a) -> GreaterThan a -> a
$ctoList :: forall a. GreaterThan a -> [a]
toList :: forall a. GreaterThan a -> [a]
$cnull :: forall a. GreaterThan a -> Bool
null :: forall a. GreaterThan a -> Bool
$clength :: forall a. GreaterThan a -> Int
length :: forall a. GreaterThan a -> Int
$celem :: forall a. Eq a => a -> GreaterThan a -> Bool
elem :: forall a. Eq a => a -> GreaterThan a -> Bool
$cmaximum :: forall a. Ord a => GreaterThan a -> a
maximum :: forall a. Ord a => GreaterThan a -> a
$cminimum :: forall a. Ord a => GreaterThan a -> a
minimum :: forall a. Ord a => GreaterThan a -> a
$csum :: forall a. Num a => GreaterThan a -> a
sum :: forall a. Num a => GreaterThan a -> a
$cproduct :: forall a. Num a => GreaterThan a -> a
product :: forall a. Num a => GreaterThan a -> a
Foldable, (forall a b. (a -> b) -> GreaterThan a -> GreaterThan b)
-> (forall a b. a -> GreaterThan b -> GreaterThan a)
-> Functor GreaterThan
forall a b. a -> GreaterThan b -> GreaterThan a
forall a b. (a -> b) -> GreaterThan a -> GreaterThan b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> GreaterThan a -> GreaterThan b
fmap :: forall a b. (a -> b) -> GreaterThan a -> GreaterThan b
$c<$ :: forall a b. a -> GreaterThan b -> GreaterThan a
<$ :: forall a b. a -> GreaterThan b -> GreaterThan a
Functor, GreaterThan a -> GreaterThan a -> GreaterThan a
(GreaterThan a -> GreaterThan a -> GreaterThan a)
-> Meet (GreaterThan a)
forall a. Meet a => GreaterThan a -> GreaterThan a -> GreaterThan a
forall s. (s -> s -> s) -> Meet s
$c/\ :: forall a. Meet a => GreaterThan a -> GreaterThan a -> GreaterThan a
/\ :: GreaterThan a -> GreaterThan a -> GreaterThan a
Meet, Integer -> GreaterThan a
GreaterThan a -> GreaterThan a
GreaterThan a -> GreaterThan a -> GreaterThan a
(GreaterThan a -> GreaterThan a -> GreaterThan a)
-> (GreaterThan a -> GreaterThan a -> GreaterThan a)
-> (GreaterThan a -> GreaterThan a -> GreaterThan a)
-> (GreaterThan a -> GreaterThan a)
-> (GreaterThan a -> GreaterThan a)
-> (GreaterThan a -> GreaterThan a)
-> (Integer -> GreaterThan a)
-> Num (GreaterThan a)
forall a. Num a => Integer -> GreaterThan a
forall a. Num a => GreaterThan a -> GreaterThan a
forall a. Num a => GreaterThan a -> GreaterThan a -> GreaterThan a
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: forall a. Num a => GreaterThan a -> GreaterThan a -> GreaterThan a
+ :: GreaterThan a -> GreaterThan a -> GreaterThan a
$c- :: forall a. Num a => GreaterThan a -> GreaterThan a -> GreaterThan a
- :: GreaterThan a -> GreaterThan a -> GreaterThan a
$c* :: forall a. Num a => GreaterThan a -> GreaterThan a -> GreaterThan a
* :: GreaterThan a -> GreaterThan a -> GreaterThan a
$cnegate :: forall a. Num a => GreaterThan a -> GreaterThan a
negate :: GreaterThan a -> GreaterThan a
$cabs :: forall a. Num a => GreaterThan a -> GreaterThan a
abs :: GreaterThan a -> GreaterThan a
$csignum :: forall a. Num a => GreaterThan a -> GreaterThan a
signum :: GreaterThan a -> GreaterThan a
$cfromInteger :: forall a. Num a => Integer -> GreaterThan a
fromInteger :: Integer -> GreaterThan a
Num, ReadPrec [GreaterThan a]
ReadPrec (GreaterThan a)
Int -> ReadS (GreaterThan a)
ReadS [GreaterThan a]
(Int -> ReadS (GreaterThan a))
-> ReadS [GreaterThan a]
-> ReadPrec (GreaterThan a)
-> ReadPrec [GreaterThan a]
-> Read (GreaterThan a)
forall a. Read a => ReadPrec [GreaterThan a]
forall a. Read a => ReadPrec (GreaterThan a)
forall a. Read a => Int -> ReadS (GreaterThan a)
forall a. Read a => ReadS [GreaterThan a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: forall a. Read a => Int -> ReadS (GreaterThan a)
readsPrec :: Int -> ReadS (GreaterThan a)
$creadList :: forall a. Read a => ReadS [GreaterThan a]
readList :: ReadS [GreaterThan a]
$creadPrec :: forall a. Read a => ReadPrec (GreaterThan a)
readPrec :: ReadPrec (GreaterThan a)
$creadListPrec :: forall a. Read a => ReadPrec [GreaterThan a]
readListPrec :: ReadPrec [GreaterThan a]
Read, Int -> GreaterThan a -> ShowS
[GreaterThan a] -> ShowS
GreaterThan a -> String
(Int -> GreaterThan a -> ShowS)
-> (GreaterThan a -> String)
-> ([GreaterThan a] -> ShowS)
-> Show (GreaterThan a)
forall a. Show a => Int -> GreaterThan a -> ShowS
forall a. Show a => [GreaterThan a] -> ShowS
forall a. Show a => GreaterThan a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall a. Show a => Int -> GreaterThan a -> ShowS
showsPrec :: Int -> GreaterThan a -> ShowS
$cshow :: forall a. Show a => GreaterThan a -> String
show :: GreaterThan a -> String
$cshowList :: forall a. Show a => [GreaterThan a] -> ShowS
showList :: [GreaterThan a] -> ShowS
Show, Functor GreaterThan
Foldable GreaterThan
(Functor GreaterThan, Foldable GreaterThan) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> GreaterThan a -> f (GreaterThan b))
-> (forall (f :: * -> *) a.
Applicative f =>
GreaterThan (f a) -> f (GreaterThan a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> GreaterThan a -> m (GreaterThan b))
-> (forall (m :: * -> *) a.
Monad m =>
GreaterThan (m a) -> m (GreaterThan a))
-> Traversable GreaterThan
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
GreaterThan (m a) -> m (GreaterThan a)
forall (f :: * -> *) a.
Applicative f =>
GreaterThan (f a) -> f (GreaterThan a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> GreaterThan a -> m (GreaterThan b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> GreaterThan a -> f (GreaterThan b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> GreaterThan a -> f (GreaterThan b)
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> GreaterThan a -> f (GreaterThan b)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
GreaterThan (f a) -> f (GreaterThan a)
sequenceA :: forall (f :: * -> *) a.
Applicative f =>
GreaterThan (f a) -> f (GreaterThan a)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> GreaterThan a -> m (GreaterThan b)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> GreaterThan a -> m (GreaterThan b)
$csequence :: forall (m :: * -> *) a.
Monad m =>
GreaterThan (m a) -> m (GreaterThan a)
sequence :: forall (m :: * -> *) a.
Monad m =>
GreaterThan (m a) -> m (GreaterThan a)
Traversable)
instance (Eq a, Meet a) => Ord (GreaterThan a) where
compare :: GreaterThan a -> GreaterThan a -> Ordering
compare GreaterThan a
a GreaterThan a
b
| GreaterThan a
a GreaterThan a -> GreaterThan a -> Bool
forall a. Eq a => a -> a -> Bool
== GreaterThan a
b = Ordering
EQ
| GreaterThan a
a GreaterThan a -> GreaterThan a -> GreaterThan a
forall s. Meet s => s -> s -> s
/\ GreaterThan a
b GreaterThan a -> GreaterThan a -> Bool
forall a. Eq a => a -> a -> Bool
== GreaterThan a
a = Ordering
LT
| Bool
otherwise = Ordering
GT
GreaterThan a
a <= :: GreaterThan a -> GreaterThan a -> Bool
<= GreaterThan a
b = GreaterThan a
a GreaterThan a -> GreaterThan a -> GreaterThan a
forall s. Meet s => s -> s -> s
/\ GreaterThan a
b GreaterThan a -> GreaterThan a -> Bool
forall a. Eq a => a -> a -> Bool
== GreaterThan a
a