strict-0.3.2: Strict data types and String IO.

Copyright(c) 2006-2007 Roman Leshchinskiy
LicenseBSD-style (see the file LICENSE)
MaintainerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

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 infixl 2 
Instances
(Bounded a, Bounded b) => Bounded (Pair a b) Source # 
Instance details

Defined in Data.Strict.Tuple

Methods

minBound :: Pair a b Source #

maxBound :: Pair a b Source #

(Eq a, Eq b) => Eq (Pair a b) Source # 
Instance details

Defined in Data.Strict.Tuple

Methods

(==) :: Pair a b -> Pair a b -> Bool Source #

(/=) :: Pair a b -> Pair a b -> Bool Source #

(Ord a, Ord b) => Ord (Pair a b) Source # 
Instance details

Defined in Data.Strict.Tuple

Methods

compare :: Pair a b -> Pair a b -> Ordering Source #

(<) :: Pair a b -> Pair a b -> Bool Source #

(<=) :: Pair a b -> Pair a b -> Bool Source #

(>) :: Pair a b -> Pair a b -> Bool Source #

(>=) :: Pair a b -> Pair a b -> Bool Source #

max :: Pair a b -> Pair a b -> Pair a b Source #

min :: Pair a b -> Pair a b -> Pair a b Source #

(Read a, Read b) => Read (Pair a b) Source # 
Instance details

Defined in Data.Strict.Tuple

(Show a, Show b) => Show (Pair a b) Source # 
Instance details

Defined in Data.Strict.Tuple

Methods

showsPrec :: Int -> Pair a b -> ShowS Source #

show :: Pair a b -> String Source #

showList :: [Pair a b] -> ShowS Source #

(Ix a, Ix b) => Ix (Pair a b) Source # 
Instance details

Defined in Data.Strict.Tuple

Methods

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

index :: (Pair a b, Pair a b) -> Pair a b -> Int Source #

unsafeIndex :: (Pair a b, Pair a b) -> Pair a b -> Int

inRange :: (Pair a b, Pair a b) -> Pair a b -> Bool Source #

rangeSize :: (Pair a b, Pair a b) -> Int Source #

unsafeRangeSize :: (Pair a b, Pair a b) -> Int

type (:!:) = Pair infixl 2 Source #

fst :: Pair a b -> a Source #

Extract the first component of a strict pair.

snd :: Pair a b -> b Source #

Extract the second component of a strict pair.

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

Curry a function on strict pairs.

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

Convert a curried function to a function on strict pairs.