{-# LANGUAGE Safe #-}
module SDP.Tuple
(
T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
fsts, snds, both
)
where
import Data.Function ( on )
default ()
fsts :: (Functor f) => f (a, b) -> f a
fsts :: f (a, b) -> f a
fsts = ((a, b) -> a) -> f (a, b) -> f a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (a, b) -> a
forall a b. (a, b) -> a
fst
snds :: (Functor f) => f (a, b) -> f b
snds :: f (a, b) -> f b
snds = ((a, b) -> b) -> f (a, b) -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (a, b) -> b
forall a b. (a, b) -> b
snd
both :: (a -> b) -> (a, a) -> (b, b)
both :: (a -> b) -> (a, a) -> (b, b)
both = (a -> a -> (b, b)) -> (a, a) -> (b, b)
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry ((a -> a -> (b, b)) -> (a, a) -> (b, b))
-> ((a -> b) -> a -> a -> (b, b)) -> (a -> b) -> (a, a) -> (b, b)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (b -> b -> (b, b)) -> (a -> b) -> a -> a -> (b, b)
forall b c a. (b -> b -> c) -> (a -> b) -> a -> a -> c
on (,)
type T2 i = (i,i)
type T3 i = (i,i,i)
type T4 i = (i,i,i,i)
type T5 i = (i,i,i,i,i)
type T6 i = (i,i,i,i,i,i)
type T7 i = (i,i,i,i,i,i,i)
type T8 i = (i,i,i,i,i,i,i,i)
type T9 i = (i,i,i,i,i,i,i,i,i)
type T10 i = (i,i,i,i,i,i,i,i,i,i)
type T11 i = (i,i,i,i,i,i,i,i,i,i,i)
type T12 i = (i,i,i,i,i,i,i,i,i,i,i,i)
type T13 i = (i,i,i,i,i,i,i,i,i,i,i,i,i)
type T14 i = (i,i,i,i,i,i,i,i,i,i,i,i,i,i)
type T15 i = (i,i,i,i,i,i,i,i,i,i,i,i,i,i,i)