    module Data.Tuple.Strict where

    -- * Pair

    {-# INLINE mapPair #-}
    mapPair :: (a -> c, b -> d) -> (a,b) -> (c,d)
    mapPair :: (a -> c, b -> d) -> (a, b) -> (c, d)
    mapPair (f :: a -> c
    f,g :: b -> d
    g) (a :: a
    a,b :: b
    b) = (a -> c
    f a
    a, b -> d
    g b
    b)

    {-# INLINE mapFst #-}
    mapFst :: (a -> c) -> (a,b) -> (c,b)
    mapFst :: (a -> c) -> (a, b) -> (c, b)
    mapFst f :: a -> c
    f (a :: a
    a,b :: b
    b) = (a -> c
    f a
    a, b
    b)

    {-# INLINE mapSnd #-}
    mapSnd :: (b -> c) -> (a,b) -> (a,c)
    mapSnd :: (b -> c) -> (a, b) -> (a, c)
    mapSnd f :: b -> c
    f (a :: a
    a,b :: b
    b) = (a
    a, b -> c
    f b
    b)

    {-# INLINE zipPair #-}
    zipPair :: (a,b) -> (c,d) -> ((a,c),(b,d))
    zipPair :: (a, b) -> (c, d) -> ((a, c), (b, d))
    zipPair (a :: a
    a,b :: b
    b) (c :: c
    c,d :: d
    d) = ((a
    a,c
    c),(b
    b,d
    d))

    {-# INLINE zipWithPair #-}
    zipWithPair :: (a -> c -> e, b -> d -> f) -> (a,b) -> (c,d) -> (e,f)
    zipWithPair :: (a -> c -> e, b -> d -> f) -> (a, b) -> (c, d) -> (e, f)
    zipWithPair (e :: a -> c -> e
    e,f :: b -> d -> f
    f) (a :: a
    a,b :: b
    b) (c :: c
    c,d :: d
    d) = (a -> c -> e
    e a
    a c
    c, b -> d -> f
    f b
    b d
    d)

    {-# INLINE swap #-}
    swap :: (a,b) -> (b,a)
    swap :: (a, b) -> (b, a)
    swap (a :: a
    a,b :: b
    b) = (b
    b,a
    a)

    -- * Triple

    {-# INLINE mapTriple #-}
    mapTriple :: (a -> d, b -> e, c -> f) -> (a,b,c) -> (d,e,f)
    mapTriple :: (a -> d, b -> e, c -> f) -> (a, b, c) -> (d, e, f)
    mapTriple (f :: a -> d
    f,g :: b -> e
    g,h :: c -> f
    h) (a :: a
    a,b :: b
    b,c :: c
    c) = (a -> d
    f a
    a, b -> e
    g b
    b, c -> f
    h c
    c)

    {-# INLINE mapFst3 #-}
    mapFst3 :: (a -> d) -> (a,b,c) -> (d,b,c)
    mapFst3 :: (a -> d) -> (a, b, c) -> (d, b, c)
    mapFst3 f :: a -> d
    f (a :: a
    a,b :: b
    b,c :: c
    c) = (a -> d
    f a
    a, b
    b, c
    c)

    {-# INLINE mapSnd3 #-}
    mapSnd3 :: (b -> d) -> (a,b,c) -> (a,d,c)
    mapSnd3 :: (b -> d) -> (a, b, c) -> (a, d, c)
    mapSnd3 f :: b -> d
    f (a :: a
    a,b :: b
    b,c :: c
    c) = (a
    a, b -> d
    f b
    b, c
    c)

    {-# INLINE mapThd3 #-}
    mapThd3 :: (c -> d) -> (a,b,c) -> (a,b,d)
    mapThd3 :: (c -> d) -> (a, b, c) -> (a, b, d)
    mapThd3 f :: c -> d
    f (a :: a
    a,b :: b
    b,c :: c
    c) = (a
    a, b
    b, c -> d
    f c
    c)

    {-# INLINE zipWithTriple #-}
    zipWithTriple ::
       (a -> d -> g, b -> e -> h, c -> f -> i) -> (a,b,c) -> (d,e,f) -> (g,h,i)
    zipWithTriple :: (a -> d -> g, b -> e -> h, c -> f -> i)
    -> (a, b, c) -> (d, e, f) -> (g, h, i)
    zipWithTriple (g :: a -> d -> g
    g,h :: b -> e -> h
    h,i :: c -> f -> i
    i) (a :: a
    a,b :: b
    b,c :: c
    c) (d :: d
    d,e :: e
    e,f :: f
    f) = (a -> d -> g
    g a
    a d
    d, b -> e -> h
    h b
    b e
    e, c -> f -> i
    i c
    c f
    f)

    {-# INLINE uncurry3 #-}
    uncurry3 :: (a -> b -> c -> d) -> ((a, b, c) -> d)
    uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
    uncurry3 f :: a -> b -> c -> d
    f (a :: a
    a,b :: b
    b,c :: c
    c) = a -> b -> c -> d
    f a
    a b
    b c
    c