strict-0.3.2: Strict data types and String IO.

Portabilityportable
Stabilityexperimental
MaintainerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Safe HaskellNone

Data.Strict.Tuple

Description

Strict pairs.

Same as regular Haskell pairs, but (x :*: _|_) = (_|_ :*: y) = _|_

Synopsis

Documentation

data Pair a b Source

The type of strict pairs.

Constructors

!a :!: !b 

Instances

(Bounded a, Bounded b) => Bounded (Pair a b) 
(Eq a, Eq b) => Eq (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) 

fst :: Pair a b -> aSource

Extract the first component of a strict pair.

snd :: Pair a b -> bSource

Extract the second component of a strict pair.

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

Curry a function on strict pairs.

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

Convert a curried function to a function on strict pairs.