strict-0.4.0.1: Strict data types and String IO.
Safe Haskell Safe
Language Haskell2010

Data.Strict.Tuple

Description

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

Note that unlike regular Haskell pairs, (x :*: _|_) = (_|_ :*: y) = _|_

Synopsis

Documentation

data Pair a b Source #

The type of strict pairs.

Constructors

!a :!: !b infix 2

Instances

Instances details
Bifunctor Pair Source #
Instance details

Defined in Data.Strict.Tuple

Methods

bimap :: (a -> b) -> (c -> d) -> Pair a c -> Pair b d Source #

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

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

Swap Pair Source #
Instance details

Defined in Data.Strict.Tuple

Assoc Pair Source #
Instance details

Defined in Data.Strict.Tuple

Bitraversable Pair Source #
Instance details

Defined in Data.Strict.Tuple

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Pair a b -> f ( Pair c d) Source #

Bifoldable Pair Source #
Instance details

Defined in Data.Strict.Tuple

Methods

bifold :: Monoid m => Pair m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Pair a b -> m Source #

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

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

Eq2 Pair Source #
Instance details

Defined in Data.Strict.Tuple

Methods

liftEq2 :: (a -> b -> Bool ) -> (c -> d -> Bool ) -> Pair a c -> Pair b d -> Bool Source #

Ord2 Pair Source #
Instance details

Defined in Data.Strict.Tuple

Methods

liftCompare2 :: (a -> b -> Ordering ) -> (c -> d -> Ordering ) -> Pair a c -> Pair b d -> Ordering Source #

Read2 Pair Source #
>>> readsPrec2 0 "'a' :!: ('b' :!: 'c')" :: [(Pair Char (Pair Char Char), String)]
[('a' :!: ('b' :!: 'c'),"")]
>>> readsPrec2 0 "('a' :!: 'b') :!: 'c'" :: [(Pair (Pair Char Char) Char, String)]
[(('a' :!: 'b') :!: 'c',"")]
Instance details

Defined in Data.Strict.Tuple

Show2 Pair Source #
Instance details

Defined in Data.Strict.Tuple

Methods

liftShowsPrec2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> Int -> Pair a b -> ShowS Source #

liftShowList2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> [ Pair a b] -> ShowS Source #

NFData2 Pair Source #
Instance details

Defined in Data.Strict.Tuple

Methods

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

Hashable2 Pair Source #
Instance details

Defined in Data.Strict.Tuple

Functor ( Pair e) Source #
Instance details

Defined in Data.Strict.Tuple

Methods

fmap :: (a -> b) -> Pair e a -> Pair e b Source #

(<$) :: a -> Pair e b -> Pair e a Source #

Foldable ( Pair e) Source #
Instance details

Defined in Data.Strict.Tuple

Traversable ( Pair e) Source #
Instance details

Defined in Data.Strict.Tuple

Methods

traverse :: Applicative f => (a -> f b) -> Pair e a -> f ( Pair e b) Source #

sequenceA :: Applicative f => Pair e (f a) -> f ( Pair e a) Source #

mapM :: Monad m => (a -> m b) -> Pair e a -> m ( Pair e b) Source #

sequence :: Monad m => Pair e (m a) -> m ( Pair e a) Source #

Eq a => Eq1 ( Pair a) Source #
Instance details

Defined in Data.Strict.Tuple

Methods

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

Ord a => Ord1 ( Pair a) Source #
Instance details

Defined in Data.Strict.Tuple

Read a => Read1 ( Pair a) Source #
Instance details

Defined in Data.Strict.Tuple

Show a => Show1 ( Pair a) Source #
Instance details

Defined in Data.Strict.Tuple

Methods

liftShowsPrec :: ( Int -> a0 -> ShowS ) -> ([a0] -> ShowS ) -> Int -> Pair a a0 -> ShowS Source #

liftShowList :: ( Int -> a0 -> ShowS ) -> ([a0] -> ShowS ) -> [ Pair a a0] -> ShowS Source #

NFData a => NFData1 ( Pair a) Source #
Instance details

Defined in Data.Strict.Tuple

Methods

liftRnf :: (a0 -> ()) -> Pair a a0 -> () Source #

Hashable a => Hashable1 ( Pair a) Source #
Instance details

Defined in Data.Strict.Tuple

Generic1 ( Pair a :: Type -> Type ) Source #
Instance details

Defined in Data.Strict.Tuple

Associated Types

type Rep1 ( Pair a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Pair a a0 -> Rep1 ( Pair a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Pair a) a0 -> Pair a a0 Source #

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

Defined in Data.Strict.Tuple

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

Defined in Data.Strict.Tuple

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

Defined in Data.Strict.Tuple

Methods

gfoldl :: ( forall d b0. Data d => c (d -> b0) -> d -> c b0) -> ( forall g. g -> c g) -> Pair a b -> c ( Pair a b) Source #

gunfold :: ( forall b0 r. Data b0 => c (b0 -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Pair a b) Source #

toConstr :: Pair a b -> Constr Source #

dataTypeOf :: Pair a b -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Pair a b)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Pair a b)) Source #

gmapT :: ( forall b0. Data b0 => b0 -> b0) -> Pair a b -> Pair a b Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Pair a b -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Pair a b -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Pair a b -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Pair a b -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Pair a b -> m ( Pair a b) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Pair a b -> m ( Pair a b) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Pair a b -> m ( Pair a b) Source #

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

Defined in Data.Strict.Tuple

( 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

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

Defined in Data.Strict.Tuple

Generic ( Pair a b) Source #
Instance details

Defined in Data.Strict.Tuple

Associated Types

type Rep ( Pair a b) :: Type -> Type Source #

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

Defined in Data.Strict.Tuple

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

Defined in Data.Strict.Tuple

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

Defined in Data.Strict.Tuple

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

Defined in Data.Strict.Tuple

Methods

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

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

Defined in Data.Strict.Tuple

Strict (a, b) ( Pair a b) Source #
Instance details

Defined in Data.Strict.Classes

Methods

toStrict :: (a, b) -> Pair a b Source #

toLazy :: Pair a b -> (a, b) Source #

type Rep1 ( Pair a :: Type -> Type ) Source #
Instance details

Defined in Data.Strict.Tuple

type Rep ( Pair a b) Source #
Instance details

Defined in Data.Strict.Tuple

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.

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.