connections-0.2.0: Orders, Galois connections, and lattices.
Safe HaskellSafe
LanguageHaskell2010

Data.Connection.Class

Synopsis

Conn

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

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

Connections have many nice properties wrt numerical conversion:

>>> range (conn @_ @Rational @Float) (1 :% 8) -- eighths are exactly representable in a float
(0.125,0.125)
>>> range (conn @_ @Rational @Float) (1 :% 7) -- sevenths are not
(0.14285713,0.14285715)

Instances

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

Defined in Data.Connection.Conn

Methods

id :: forall (a :: k0). Conn k a a #

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

identity :: Conn k a a Source #

The identity Conn.

Connection k

type Triple a b = (Left a b, Right a b) Source #

A constraint kind representing an adjoint triple of Galois connections.

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

Obtain a Conn from an adjoint triple of monotone functions.

This is a view pattern for an arbitrary Conn. When applied to a ConnL or ConnR, the two functions of type a -> b returned will be identical.

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

For detailed properties see Property.

type ConnK 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.

embed :: Conn k a b -> b -> a Source #

Obtain the center of a ConnK, upper adjoint of a ConnL, or lower adjoint of a ConnR.

extremal :: Triple () a => Conn k a Bool Source #

The canonical connections against a Bool.

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

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 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]

half :: (Num a, Preorder a) => ConnK 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 - lower t x) (upper t x - x)
>>> maybe False (== EQ) $ half f64f32 (midpoint f64f32 pi)
True

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

Return the midpoint of the interval containing x.

>>> pi - midpoint f64f32 pi
3.1786509424591713e-8

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

Obtain the upper and/or lower adjoints of a connection.

range c = floorWith c &&& ceilingWith c
>>> range f64f32 pi
(3.1415925,3.1415927)
>>> range f64f32 (0/0)
(NaN,NaN)

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.

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

Lift a unary function over a Conn.

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 Conn.

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

Example avoiding loss-of-precision:

>>> f x y = (x + y) - x
>>> maxOdd32 = 1.6777215e7
>>> f maxOdd32 2.0 :: Float
1.0
>>> round2 @Rational @Float f maxOdd32 2.0
2.0
>>> maxOdd64 = 9.007199254740991e15
>>> 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 Conn.

Results are truncated towards 0.

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

Lift a binary function over a Conn.

Results are truncated towards 0.

Connection L

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.

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.

connL :: Left 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.

embedL :: Left a b => b -> a Source #

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

minimal :: Left () a => a Source #

A minimal element of a preorder.

minimal needn't be unique, but it must obey:

x <~ minimal => x ~~ minimal

join :: Left (a, a) a => a -> a -> a infixr 5 Source #

Semigroup operation on a join-lattice.

ceiling :: Left a b => a -> b Source #

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

ceiling @a @a = id
ceiling (x1 `join` a2) = ceiling x1 `join` ceiling x2

The latter law is the adjoint functor theorem for preorders.

>>> Data.Connection.ceiling @Rational @Float (0 :% 0)
NaN
>>> Data.Connection.ceiling @Rational @Float (1 :% 0)
Infinity
>>> Data.Connection.ceiling @Rational @Float (13 :% 10)
1.3000001

ceiling1 :: Left a b => (a -> a) -> b -> b Source #

Lift a unary function over a ConnL.

ceiling2 :: Left a b => (a -> a -> a) -> b -> b -> b Source #

Lift a binary function over a ConnL.

Connection R

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.

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 ConnK) that can lower into a standard connection in either of two ways.

connR :: Right 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.

embedR :: Right a b => b -> a Source #

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

maximal :: Right () a => a Source #

A maximal element of a preorder.

maximal needn't be unique, but it must obey:

x >~ maximal => x ~~ maximal

meet :: Right (a, a) a => a -> a -> a infixr 6 Source #

Semigroup operation on a meet-lattice.

floor :: Right a b => a -> b Source #

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

floor @a @a = id
floor (x1 `meet` x2) = floor x1 `meet` floor x2

The latter law is the adjoint functor theorem for preorders.

>>> Data.Connection.floor @Rational @Float (0 :% 0)
NaN
>>> Data.Connection.floor @Rational @Float (1 :% 0)
Infinity
>>> Data.Connection.floor @Rational @Float (13 :% 10)
1.3

floor1 :: Right a b => (a -> a) -> b -> b Source #

Lift a unary function over a ConnR.

floor2 :: Right a b => (a -> a -> a) -> b -> b -> b Source #

Lift a binary function over a ConnR.

Combinators

(>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c infixr 1 #

Left-to-right composition

(<<<) :: forall k cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c infixr 1 #

Right-to-left composition

(/|\) :: Connection k (c, c) c => Conn k a c -> Conn k b c -> Conn k (a, b) c infixr 4 Source #

A preorder variant of &&&.

(\|/) :: Conn k c a -> Conn k c b -> Conn k c (Either a b) infixr 3 Source #

A preorder variant of |||.

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

Connection

data Kan Source #

A data kind distinguishing the directionality of a Galois connection:

Constructors

L 
R 

type ConnInteger a = Left a (Maybe Integer) Source #

A constraint kind for Integer conversions.

Usable in conjunction with RebindableSyntax:

fromInteger = embedL . Just :: ConnInteger a => Integer -> a

type ConnRational a = Triple Rational a Source #

A constraint kind for Rational conversions.

Usable in conjunction with RebindableSyntax:

fromRational = round :: ConnRational a => Rational -> a

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 @_ @Rational @Float) (22 :% 7)
(3.142857,3.1428573)
>>> range (conn @_ @Double @Float) pi
(3.1415925,3.1415927)

Instances

Instances details
Connection k Int64 Int Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int64 Int Source #

Connection k Rational Double Source # 
Instance details

Defined in Data.Connection.Class

Connection k () Double Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Double Source #

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 () 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 Word64 Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Word64 Word 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 Double Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Double Bool Source #

Connection k Float Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Float Bool Source #

Connection k Rational Bool Source # 
Instance details

Defined in Data.Connection.Class

Connection k Int Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int Bool Source #

Connection k Int64 Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int64 Bool Source #

Connection k Int32 Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int32 Bool Source #

Connection k Int16 Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int16 Bool Source #

Connection k Int8 Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Int8 Bool Source #

Connection k Positive Bool Source # 
Instance details

Defined in Data.Connection.Class

Connection k Word Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Word Bool Source #

Connection k Word64 Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Word64 Bool Source #

Connection k Word32 Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Word32 Bool Source #

Connection k Word16 Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Word16 Bool Source #

Connection k Word8 Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k Word8 Bool Source #

Connection k Ordering Bool Source # 
Instance details

Defined in Data.Connection.Class

Connection k () Bool Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn k () Bool Source #

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

Defined in Data.Connection.Class

Methods

conn :: Conn k a a Source #

Connection 'L Int Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int Word Source #

Connection 'L Int Word64 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int Word64 Source #

Connection 'L Int8 Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int8 Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int8 Word Source #

Connection 'L Int8 Word8 Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int8 Word8 Source #

Connection 'L Int8 Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int8 Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int8 Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int16 Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int16 Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int16 Word Source #

Connection 'L Int16 Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int16 Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int16 Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int32 Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int32 Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int32 Word Source #

Connection 'L Int32 Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int32 Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int64 Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int64 Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int64 Word Source #

Connection 'L Int64 Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Integer Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word8 Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word8 Word Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Word8 Word Source #

Connection 'L Word8 Word16 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word8 Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word8 Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word16 Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word16 Word Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word16 Word32 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word16 Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word32 Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word32 Word Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word32 Word64 Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word64 Natural Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L () Natural Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L () Natural Source #

Connection 'L () IntSet Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L () IntSet Source #

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

Defined in Data.Connection.Class

Methods

conn :: Conn k () (Extended a) 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 #

All Int32 values are exactly representable in a Double.

Instance details

Defined in Data.Connection.Class

Connection k Double (Extended Int16) Source #

All Int16 values are exactly representable in a Double.

Instance details

Defined in Data.Connection.Class

Connection k Double (Extended Int8) Source #

All Int08 values are exactly representable in a Double.

Instance details

Defined in Data.Connection.Class

Connection k Float (Extended Int16) Source #

All Int16 values are exactly representable in a Float.

Instance details

Defined in Data.Connection.Class

Connection k Float (Extended Int8) Source #

All Int08 values are exactly representable in a Float.

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 Int (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int8 (Maybe Int) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int8 (Maybe Int) Source #

Connection 'L Int8 (Maybe Int16) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int8 (Maybe Int16) Source #

Connection 'L Int8 (Maybe Int32) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int8 (Maybe Int32) Source #

Connection 'L Int8 (Maybe Int64) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int8 (Maybe Int64) Source #

Connection 'L Int8 (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int16 (Maybe Int) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int16 (Maybe Int) Source #

Connection 'L Int16 (Maybe Int32) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int16 (Maybe Int64) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int16 (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int32 (Maybe Int) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Int32 (Maybe Int) Source #

Connection 'L Int32 (Maybe Int64) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int32 (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Int64 (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Natural (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word8 (Maybe Int) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Word8 (Maybe Int) Source #

Connection 'L Word8 (Maybe Int16) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word8 (Maybe Int32) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word8 (Maybe Int64) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word8 (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word16 (Maybe Int) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Word16 (Maybe Int) Source #

Connection 'L Word16 (Maybe Int32) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word16 (Maybe Int64) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word16 (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word32 (Maybe Int) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'L Word32 (Maybe Int) Source #

Connection 'L Word32 (Maybe Int64) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word32 (Maybe Integer) Source # 
Instance details

Defined in Data.Connection.Class

Connection 'L Word64 (Maybe Integer) 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 #

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

Defined in Data.Connection.Class

Methods

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

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

Defined in Data.Connection.Class

Methods

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

(Left () 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, Right () b) => Connection 'R () (Either a b) Source # 
Instance details

Defined in Data.Connection.Class

Methods

conn :: Conn 'R () (Either 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 #

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

Defined in Data.Connection.Class

Methods

conn :: Conn k (Maybe b) (Either a b) Source #

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

Defined in Data.Connection.Class

Methods

conn :: Conn k (Maybe a) (Either a b) Source #

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 #

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 #

Left (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 #

Right (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 #

(Total a, Left (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 #

(Total a, Right (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 #