| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Connection.Trip
Synopsis
- data Trip a b = Trip (a -> b) (b -> a) (a -> b)
- tripl :: Trip a b -> Conn a b
- tripr :: Trip a b -> Conn b a
- unitl :: Trip a b -> a -> a
- unitr :: Trip a b -> b -> b
- counitl :: Trip a b -> b -> b
- counitr :: Trip a b -> a -> a
- strong' :: Trip a b -> Trip c d -> Trip (a, c) (b, d)
- choice' :: Trip a b -> Trip c d -> Trip (Either a c) (Either b d)
- half :: (Num a, Prd a) => Trip a b -> a -> Maybe Ordering
- tied :: (Num a, Prd a) => Trip a b -> a -> Bool
- above :: (Num a, Prd a) => Trip a b -> a -> Bool
- below :: (Num a, Prd a) => Trip a b -> a -> Bool
- roundOn :: (Prd a, Num a) => Trip a b -> a -> b
- floorOn :: Trip a b -> a -> b
- ceilingOn :: Trip a b -> a -> b
- truncateOn :: (Num a, Prd a) => Trip a b -> a -> b
Triple
An adjoint triple of Galois connections.
An adjoint triple is a chain of connections of length 2:
\(f \dashv g \dashv h \)
For further information see Property and https://ncatlab.org/nlab/show/adjoint+triple.
Constructors
| Trip (a -> b) (b -> a) (a -> b) |
Rounding
half :: (Num a, Prd a) => Trip a b -> a -> Maybe Ordering Source #
Determine which half of the interval between two representations of a a particular value lies.