uniform-pair-0.1.5: Uniform pairs with class instances

Copyright(c) 2013 Tabula, Inc.
Maintainerconal@conal.net
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.UniformPair

Description

Uniform pairs. Because these pairs memoize functions (from Bool)--i.e., they're representable functors--these instances provided are fully determined by the corresponding instances for functions, thanks to the type class morphism principle.

Synopsis

Documentation

data Pair a Source

Uniform pairs

Constructors

a :# a infix 1 

Instances

fstP :: Pair a -> a Source

sndP :: Pair a -> a Source

firstP :: (a -> a) -> Pair a -> Pair a Source

secondP :: (a -> a) -> Pair a -> Pair a Source

compareSwap :: Ord a => Pair a -> Pair a Source