Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
Tumble
gives a Join
semilattice for any Meet
semilattice and vice versa, Lower
bounds for Upper
bounds and vice versa, and swaps the bounds of Bounded
instances.
Functor Tumble Source # | |
Foldable Tumble Source # | |
Traversable Tumble Source # | |
Bounded a => Bounded (Tumble a) Source # | |
Enum a => Enum (Tumble a) Source # | |
Eq a => Eq (Tumble a) Source # | |
Num a => Num (Tumble a) Source # | |
Ord a => Ord (Tumble a) Source # | |
Read a => Read (Tumble a) Source # | |
Show a => Show (Tumble a) Source # | |
Upper a => Lower (Tumble a) Source # | |
Meet a => Join (Tumble a) Source # | |
Lower a => Upper (Tumble a) Source # | |
Join a => Meet (Tumble a) Source # | |
Idempotence:
x /\ x == (x :: Tumble Bool)
Associativity:
a /\ (b /\ c) == (a /\ b) /\ (c :: Tumble Bool)
Commutativity:
a /\ b == b /\ (a :: Tumble Bool)
Identity:
upperBound /\ a == (a :: Tumble Bool)
Absorption:
lowerBound /\ a == (lowerBound :: Tumble Bool)
Idempotence:
x \/ x == (x :: Tumble Bool)
Associativity:
a \/ (b \/ c) == (a \/ b) \/ (c :: Tumble Bool)
Commutativity:
a \/ b == b \/ (a :: Tumble Bool)
Identity:
lowerBound \/ a == (a :: Tumble Bool)
Absorption:
upperBound \/ a == (upperBound :: Tumble Bool)
Bounded:
upperBound == (maxBound :: Tumble Bool)
Identity of /\
:
upperBound /\ a == (a :: Tumble Bool)
Absorbing element of \/
:
upperBound \/ a == (upperBound :: Tumble Bool)
Ord:
compare upperBound (a :: Tumble Bool) /= LT
Bounded:
lowerBound == (minBound :: Tumble Bool)
Identity of \/
:
lowerBound \/ a == (a :: Tumble Bool)
Absorbing element of /\
:
lowerBound /\ a == (lowerBound :: Tumble Bool)
Ord:
compare lowerBound (a :: Tumble Bool) /= GT
>>>
import Test.QuickCheck
>>>
instance Arbitrary a => Arbitrary (Tumble a) where arbitrary = Tumble <$> arbitrary ; shrink (Tumble a) = Tumble <$> shrink a