connections-0.1.0: Orders, Galois connections, and lattices.

Safe HaskellSafe
LanguageHaskell2010

Data.Connection

Contents

Synopsis

Types

data Kan Source #

A data kind distinguishing the chirality of a Kan extension.

Here it serves to distinguish the directionality of a preorder:

  • L-tagged types are 'upwards-directed'
  • R-tagged types are 'downwards-directed'

Constructors

L 
R 

type Semilattice k a = Connection k (a, a) a Source #

Semilattices.

A complete is a partially ordered set in which every two elements have a unique join (least upper bound or supremum) and a unique meet (greatest lower bound or infimum).

These operations may in turn be defined by the lower and upper adjoints to the unique function a -> (a, a).

Associativity

x \/ (y \/ z) = (x \/ y) \/ z
x /\ (y /\ z) = (x /\ y) /\ z

Commutativity

x \/ y = y \/ x
x /\ y = y /\ x

Idempotency

x \/ x = x
x /\ x = x

Absorption

(x \/ y) /\ y = y
(x /\ y) \/ y = y

See Absorption.

Note that distributivity is _not_ a requirement for a complete. However when a is distributive we have;

glb x y z = lub x y z

See https://en.wikipedia.org/wiki/Lattice_(order).

type Extremal k = Connection k () Source #

type ConnExtended k a b = Connection k a (Extended b) Source #

Connection L

type ConnL = Conn L Source #

A Galois connection between two monotone functions.

A Galois connection between f and g, written \(f \dashv g \) is an adjunction in the category of preorders.

Each side of the connection may be defined in terms of the other:

\( g(x) = \sup \{y \in E \mid f(y) \leq x \} \)

\( f(x) = \inf \{y \in E \mid g(y) \geq x \} \)

For further information see Property.

Caution: Monotonicity is not checked.

pattern ConnL :: (a -> b) -> (b -> a) -> ConnL a b Source #

A view pattern for a ConnL.

Caution: ConnL f g must obey \(f \dashv g \). This condition is not checked.

connL :: Connection L a b => ConnL a b Source #

A specialization of conn to left-side connections.

This is a convenience function provided primarily to avoid needing to enable DataKinds.

swapL :: ConnR a b -> ConnL b a Source #

Witness to the symmetry between ConnL and ConnR.

swapL . swapR = id
swapR . swapL = id

embedL :: Connection L a b => b -> a Source #

Extract the center of a Trip or upper half of a ConnL.

ceiling :: Connection L a b => a -> b Source #

Extract the ceiling of a Trip or lower half of a ConnL.

ceiling @a @a = id
>>> ceiling @Rational @Float (0 :% 0)
NaN
>>> ceiling @Rational @Float (1 :% 0)
Infinity
>>> ceiling @Rational @Float (13 :% 10)
1.3000001

ceiling1 :: Connection L a b => (a -> a) -> b -> b Source #

Lift a unary function over a ConnL.

ceiling2 :: Connection L a b => (a -> a -> a) -> b -> b -> b Source #

Lift a binary function over a ConnL.

filterL :: Connection L a b => a -> b -> Bool Source #

Obtain the principal filter in B generated by an element of A.

A subset B of a lattice is an filter if and only if it is an upper set that is closed under finite meets, i.e., it is nonempty and for all x, y in B, the element x / y is also in b.

filterL and filterR commute with Down:

filterL a b <=> filterR (Down a) (Down b)
filterL (Down a) (Down b) <=> filterR a b

filterL a is upward-closed for all a:

a <= b1 && b1 <= b2 => a <= b2
a1 <= b && inf a2 <= b => ceiling a1 /\ ceiling a2 <= b

See https://en.wikipedia.org/wiki/Filter_(mathematics)

minimal :: Extremal L a => a Source #

A minimal element of a preorder defined by a connection with '()'.

minimal needn't be unique, but we must have:

x <~ minimal => x ~~ minimal

(\/) :: Semilattice L a => a -> a -> a infixr 5 Source #

Semigroup operation on a join-semilattice.

(\/) = curry $ lowerL forked

glb :: Triple (a, a) a => a -> a -> a -> a Source #

Greatest lower bound operator.

glb x x y = x
glb x y z = glb z x y
glb x x y = x
glb x y z = glb x z y
glb (glb x w y) w z = glb x w (glb y w z)
>>> glb 1.0 9.0 7.0
7.0
>>> glb 1.0 9.0 (0.0 / 0.0)
9.0
>>> glb (fromList [1..3]) (fromList [3..5]) (fromList [5..7]) :: Set Int
fromList [3,5]

Connection R

type ConnR = Conn R Source #

A Galois connection between two monotone functions.

ConnR is the mirror image of ConnL:

swapR :: ConnL a b -> ConnR b a

If you only require one connection there is no particular reason to use one version over the other.

However some use cases (e.g. rounding) require an adjoint triple of connections (i.e. a Trip) that can lower into a standard connection in either of two ways.

pattern ConnR :: (b -> a) -> (a -> b) -> ConnR a b Source #

A view pattern for a ConnR.

Caution: ConnR f g must obey \(f \dashv g \). This condition is not checked.

connR :: Connection R a b => ConnR a b Source #

A specialization of conn to right-side connections.

This is a convenience function provided primarily to avoid needing to enable DataKinds.

swapR :: ConnL a b -> ConnR b a Source #

Witness to the symmetry between ConnL and ConnR.

swapL . swapR = id
swapR . swapL = id

floor :: Connection R a b => a -> b Source #

Extract the floor of a Trip or upper half of a ConnL.

floor @a @a = id
>>> floor @Rational @Float (0 :% 0)
NaN
>>> floor @Rational @Float (1 :% 0)
Infinity
>>> floor @Rational @Float (13 :% 10)
1.3

floor1 :: Connection R a b => (a -> a) -> b -> b Source #

Lift a unary function over a ConnR.

floor2 :: Connection R a b => (a -> a -> a) -> b -> b -> b Source #

Lift a binary function over a ConnR.

embedR :: Connection R a b => b -> a Source #

Extract the center of a Trip or lower half of a ConnR.

filterR :: Connection R a b => a -> b -> Bool Source #

Obtain the principal ideal in B generated by an element of A.

A subset B of a lattice is an ideal if and only if it is a lower set that is closed under finite joins, i.e., it is nonempty and for all x, y in B, the element x / y is also in B.

filterR a is downward-closed for all a:

a >= b1 && b1 >= b2 => a >= b2
a1 >= b && a2 >= b => floor a1 \/ floor a2 >= b

See https://en.wikipedia.org/wiki/Ideal_(order_theory)

maximal :: Extremal R a => a Source #

A maximal element of a preorder defined by a connection with '()'.

maximal needn't be unique, but we must have:

x >~ maximal => x ~~ maximal

(/\) :: Semilattice R a => a -> a -> a infixr 6 Source #

Semigroup operation on a meet-semilattice.

(/\) = curry $ upperR forked

lub :: Triple (a, a) a => a -> a -> a -> a Source #

Least upper bound operator.

The order dual of glb.

>>> lub 1.0 9.0 7.0
7.0
>>> lub 1.0 9.0 (0.0 / 0.0)
1.0

Connection

type Trip a b = forall k. Conn k a b Source #

An adjoint triple of Galois connections.

An adjoint triple is a chain of connections of length 3:

\(f \dashv g \dashv h \)

For detailed properties see Property.

pattern Conn :: (a -> b) -> (b -> a) -> (a -> b) -> Conn k a b Source #

A view pattern for an arbitrary (left or right) Conn.

Caution: Conn f g h must obey \(f \dashv g \dashv h\). This condition is not checked.

For detailed properties see Property.

half :: (Num a, Preorder a) => Trip a b -> a -> Maybe Ordering Source #

Determine which half of the interval between 2 representations of a a particular value lies.

 half t x = pcompare (x - counitR t x) (unitL t x - x)

midpoint :: Fractional a => Trip a b -> a -> a Source #

Return the midpoint of the interval containing x.

>>> midpoint f32i08 4.3
4.5
>>> midpoint f64i08 4.3
4.5
>>> pi - midpoint f64f32 pi
3.1786509424591713e-8
>>> maybe False (~~ EQ) $ half f64f32 (midpoint f64f32 pi)
True

round :: forall a b. (Num a, Triple a b) => a -> b Source #

Return the nearest value to x.

round @a @a = id

If x lies halfway between two finite values, then return the value with the larger absolute value (i.e. round away from zero).

See https://en.wikipedia.org/wiki/Rounding.

Usable in conjunction with RebindableSyntax:

>>> fromRational = round
>>> fromRational @Float 1.3
1.3
>>> fromRational @Float (1 :% 0)
Infinity
>>> fromRational @Float (0 :% 0)
NaN

round1 :: forall a b. (Num a, Triple a b) => (a -> a) -> b -> b Source #

Lift a unary function over a Trip.

Results are rounded to the nearest value with ties away from 0.

round2 :: (Num a, Triple a b) => (a -> a -> a) -> b -> b -> b Source #

Lift a binary function over a Trip.

Results are rounded to the nearest value with ties away from 0.

>>> f x y = (x + y) - x
>>> maxOdd32 = 1.6777215e7
>>> maxOdd64 = 9.007199254740991e15
>>> f maxOdd32 2.0 :: Float
1.0
>>> round2 @Rational @Float f maxOdd32 2.0
2.0
>>> f maxOdd64 2.0 :: Double
1.0
>>> round2 @Rational @Double f maxOdd64 2.0
2.0

truncate :: (Num a, Triple a b) => a -> b Source #

Truncate towards zero.

truncate @a @a = id

truncate1 :: (Num a, Triple a b) => (a -> a) -> b -> b Source #

Lift a unary function over a Trip.

Results are truncated towards 0.

truncate2 :: (Num a, Triple a b) => (a -> a -> a) -> b -> b -> b Source #

Lift a binary function over a Trip.

Results are truncated towards 0.

maybeL :: Triple () b => Trip (Maybe a) (Either a b) Source #

maybeR :: Triple () a => Trip (Maybe b) (Either a b) Source #

choice :: Conn k a b -> Conn k c d -> Conn k (Either a c) (Either b d) Source #

Lift two Conns into a Conn on the coproduct order

(choice id) (ab >>> cd) = (choice id) ab >>> (choice id) cd
(flip choice id) (ab >>> cd) = (flip choice id) ab >>> (flip choice id) cd

strong :: Conn k a b -> Conn k c d -> Conn k (a, c) (b, d) Source #

Lift two Conns into a Conn on the product order

(strong id) (ab >>> cd) = (strong id) ab >>> (strong id) cd
(flip strong id) (ab >>> cd) = (flip strong id) ab >>> (flip strong id) cd

fmapped :: Functor f => Conn k a b -> Conn k (f a) (f b) Source #

Lift a Conn into a functor.

Caution: This function will result in an invalid connection if the functor alters the internal preorder (i.e. Down).

Connection

data Conn (k :: Kan) a b Source #

An adjoint string of Galois connections of length 2 or 3.

Instances
Category (Conn k :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Connection.Conn

Methods

id :: Conn k a a #

(.) :: Conn k b c -> Conn k a b -> Conn k a c #

type Triple a b = (Connection L a b, Connection R a b) Source #

A constraint kind representing an adjoint triple of Galois connections.

class (Preorder a, Preorder b) => Connection k a b where Source #

An adjoint string of Galois connections of length 2 or 3.

Methods

conn :: Conn k a b Source #

>>> range (conn @_ @Double @Float) pi
(3.1415925,3.1415927)
>>> range (conn @_ @Rational @Float) (1 :% 7)
(0.14285713,0.14285715)
>>> range (conn @_ @Rational @Float) (1 :% 8)
(0.125,0.125)
Instances
Connection k () IntSet Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () IntSet Source #

Connection k () Double Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Double Source #

Connection k () Float Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Float Source #

Connection k () Rational Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Rational Source #

Connection k () Int Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Int Source #

Connection k () Int64 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Int64 Source #

Connection k () Int32 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Int32 Source #

Connection k () Int16 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Int16 Source #

Connection k () Int8 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Int8 Source #

Connection k () Positive Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Positive Source #

Connection k () Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Word Source #

Connection k () Word64 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Word64 Source #

Connection k () Word32 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Word32 Source #

Connection k () Word16 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Word16 Source #

Connection k () Word8 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Word8 Source #

Connection k () Ordering Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Ordering Source #

Connection k () Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Bool Source #

Connection k Rational Double Source # 
Instance details

Defined in Data.Connection.Class

Connection k Rational Float Source # 
Instance details

Defined in Data.Connection.Class

Connection k Double Float Source # 
Instance details

Defined in Data.Connection.Class

Connection k Int Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int Word Source #

Connection k Int64 Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection k Int32 Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection k Int16 Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection k Int8 Word8 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int8 Word8 Source #

Connection k Int Int64 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int Int64 Source #

Connection k Word Word64 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Word Word64 Source #

Preorder a => Connection k a a Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k a a Source #

Connection R Int32 Int8 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Int32 Int16 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Int64 Int8 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Int64 Int16 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Int64 Int32 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Natural Integer Source # 
Instance details

Defined in Data.Connection.Class

Connection R Natural Word Source # 
Instance details

Defined in Data.Connection.Class

Connection R Natural Word8 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Natural Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Natural Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Natural Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Word16 Word8 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Word32 Word8 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Word32 Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Word64 Word8 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Word64 Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection R Word64 Word32 Source # 
Instance details

Defined in Data.Connection.Class

Finite a => Connection k () (Predicate a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () (Predicate a) Source #

(Finite a, Triple () a) => Connection k () (Endo a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () (Endo a) Source #

Preorder a => Connection k () (Extended a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () (Extended a) Source #

KnownNat n => Connection k () (Finite n) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () (Finite n) Source #

Connection k a b => Connection k a (Identity b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k a (Identity b) Source #

Connection k Double (Extended Int32) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Double (Extended Int16) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Double (Extended Int8) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Float (Extended Int16) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Float (Extended Int8) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Rational (Extended Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Rational (Extended Int) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Rational (Extended Int64) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Rational (Extended Int32) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Rational (Extended Int16) Source # 
Instance details

Defined in Data.Connection.Class

Connection k Rational (Extended Int8) Source # 
Instance details

Defined in Data.Connection.Class

Connection L Double (Extended Int) Source # 
Instance details

Defined in Data.Connection.Class

Connection L Double (Extended Int64) Source # 
Instance details

Defined in Data.Connection.Class

Connection L Float (Extended Int) Source # 
Instance details

Defined in Data.Connection.Class

Connection L Float (Extended Int32) Source # 
Instance details

Defined in Data.Connection.Class

Connection L Float (Extended Int64) Source # 
Instance details

Defined in Data.Connection.Class

Preorder a => Connection L () (Maybe a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L () (Maybe a) Source #

Preorder a => Connection L () (IntMap a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L () (IntMap a) Source #

Total a => Connection L () (Set a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L () (Set a) Source #

Connection R () a => Connection R () (Maybe a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R () (Maybe a) Source #

Connection R () a => Connection R () (IntMap a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R () (IntMap a) Source #

(Total a, Finite a) => Connection R () (Set a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R () (Set a) Source #

(Finite a, Triple () b) => Connection k () (Op b a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () (Op b a) Source #

(Finite a, Triple () b) => Connection k () (a -> b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () (a -> b) Source #

(Triple () a, Triple () b) => Connection k () (a, b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () (a, b) Source #

(Connection L () a, Preorder b) => Connection L () (Either a b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L () (Either a b) Source #

(Total a, Preorder b) => Connection L () (Map a b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L () (Map a b) Source #

(Preorder a, Connection R () b) => Connection R () (Either a b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R () (Either a b) Source #

(Total a, Finite a, Connection R () b) => Connection R () (Map a b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R () (Map a b) Source #

Connection k a b => Connection k (Identity a) b Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Identity a) b Source #

Connection R (Maybe Integer) Int Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Int8 Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Int16 Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Int32 Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Int64 Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Integer Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Word Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Word8 Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection R (Maybe Integer) Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection k (IntSet, IntSet) IntSet Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Double, Double) Double Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Float, Float) Float Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Float, Float) Float Source #

Connection k (Rational, Rational) Rational Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Integer, Integer) Integer Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Int, Int) Int Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Int, Int) Int Source #

Connection k (Int64, Int64) Int64 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Int64, Int64) Int64 Source #

Connection k (Int32, Int32) Int32 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Int32, Int32) Int32 Source #

Connection k (Int16, Int16) Int16 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Int16, Int16) Int16 Source #

Connection k (Int8, Int8) Int8 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Int8, Int8) Int8 Source #

Connection k (Positive, Positive) Positive Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Natural, Natural) Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Word, Word) Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Word, Word) Word Source #

Connection k (Word64, Word64) Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Word32, Word32) Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Word16, Word16) Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Word8, Word8) Word8 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Word8, Word8) Word8 Source #

Connection k (Ordering, Ordering) Ordering Source # 
Instance details

Defined in Data.Connection.Class

Connection k (Bool, Bool) Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Bool, Bool) Bool Source #

Connection k ((), ()) () Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k ((), ()) () Source #

Finite a => Connection k (Predicate a, Predicate a) (Predicate a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Predicate a, Predicate a) (Predicate a) Source #

(Finite a, Triple (a, a) a) => Connection k (Endo a, Endo a) (Endo a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Endo a, Endo a) (Endo a) Source #

Total a => Connection k (Set a, Set a) (Set a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Set a, Set a) (Set a) Source #

Connection k (Finite n, Finite n) (Finite n) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Finite n, Finite n) (Finite n) Source #

Connection L (a, a) a => Connection L (Maybe a, Maybe a) (Maybe a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L (Maybe a, Maybe a) (Maybe a) Source #

Connection L (a, a) a => Connection L (IntMap a, IntMap a) (IntMap a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L (IntMap a, IntMap a) (IntMap a) Source #

Connection L (a, a) a => Connection L (Extended a, Extended a) (Extended a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L (Extended a, Extended a) (Extended a) Source #

Connection R (a, a) a => Connection R (Maybe a, Maybe a) (Maybe a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R (Maybe a, Maybe a) (Maybe a) Source #

Connection R (a, a) a => Connection R (IntMap a, IntMap a) (IntMap a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R (IntMap a, IntMap a) (IntMap a) Source #

Connection R (a, a) a => Connection R (Extended a, Extended a) (Extended a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R (Extended a, Extended a) (Extended a) Source #

(Finite a, Triple (b, b) b) => Connection k (Op b a, Op b a) (Op b a) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (Op b a, Op b a) (Op b a) Source #

(Finite a, Triple (b, b) b) => Connection k (a -> b, a -> b) (a -> b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k (a -> b, a -> b) (a -> b) Source #

(Triple (a, a) a, Triple (b, b) b) => Connection k ((a, b), (a, b)) (a, b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k ((a, b), (a, b)) (a, b) Source #

(Connection L (a, a) a, Connection L (b, b) b) => Connection L (Either a b, Either a b) (Either a b) Source #

All minimal elements of the upper lattice cover all maximal elements of the lower lattice.

Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L (Either a b, Either a b) (Either a b) Source #

(Total a, Connection L (b, b) b) => Connection L (Map a b, Map a b) (Map a b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn L (Map a b, Map a b) (Map a b) Source #

(Connection R (a, a) a, Connection R (b, b) b) => Connection R (Either a b, Either a b) (Either a b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R (Either a b, Either a b) (Either a b) Source #

(Total a, Connection R (b, b) b) => Connection R (Map a b, Map a b) (Map a b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn R (Map a b, Map a b) (Map a b) Source #