strict-base-types-0.3.0: Strict variants of the types provided in base.

MaintainerSimon Meier <>
Safe HaskellNone



The strict variant of the standard Haskell pairs and the corresponding variants of the functions from Data.Tuple.



data Pair a b

The type of strict pairs.


!a :!: !b 


Typeable2 Pair 
Bitraversable Pair 
Bifunctor Pair 
Bifoldable Pair 
Swapped Pair 
(Bounded a, Bounded b) => Bounded (Pair a b) 
(Eq a, Eq b) => Eq (Pair a b) 
(Data a, Data b) => Data (Pair a b) 
(Ord a, Ord b) => Ord (Pair a b) 
(Read a, Read b) => Read (Pair a b) 
(Show a, Show b) => Show (Pair a b) 
(Ix a, Ix b) => Ix (Pair a b) 
Generic (Pair a b) 
(Arbitrary a, Arbitrary b) => Arbitrary (Pair a b) 
(ToJSON a, ToJSON b) => ToJSON (Pair a b) 
(FromJSON a, FromJSON b) => FromJSON (Pair a b) 
(Monoid a, Monoid b) => Monoid (Pair a b) 
(Binary a, Binary b) => Binary (Pair a b) 
(NFData a, NFData b) => NFData (Pair a b) 
Strict (a, b) (Pair a b) 
(~ * a a', ~ * b b') => Each (Pair a a') (Pair b b') a b 
Field1 (Pair a b) (Pair a' b) a a' 
Field2 (Pair a b) (Pair a b') b b' 

fst :: Pair a b -> a

Extract the first component of a strict pair.

snd :: Pair a b -> b

Extract the second component of a strict pair.

curry :: (Pair a b -> c) -> a -> b -> c

Curry a function on strict pairs.

uncurry :: (a -> b -> c) -> Pair a b -> c

Convert a curried function to a function on strict pairs.

swap :: Pair a b -> Pair b aSource

Analagous to swap from Data.Tuple

zip :: [a] -> [b] -> [Pair a b]Source

Zip for strict pairs (defined with zipWith).

unzip :: [Pair a b] -> ([a], [b])Source

Unzip for stict pairs into a (lazy) pair of lists.