variant-1.0: Variant and EADT
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Variant.Tuple

Description

Tuple helpers

Synopsis

Documentation

uncurry3 :: (a -> b -> c -> r) -> (a, b, c) -> r Source #

Uncurry3

uncurry4 :: (a -> b -> c -> d -> r) -> (a, b, c, d) -> r Source #

Uncurry4

uncurry5 :: (a -> b -> c -> d -> e -> r) -> (a, b, c, d, e) -> r Source #

Uncurry5

uncurry6 :: (a -> b -> c -> d -> e -> f -> r) -> (a, b, c, d, e, f) -> r Source #

Uncurry6

uncurry7 :: (a -> b -> c -> d -> e -> f -> g -> r) -> (a, b, c, d, e, f, g) -> r Source #

Uncurry7

take4 :: [a] -> (a, a, a, a) Source #

Take specialised for quadruple

fromTuple4 :: (a, a, a, a) -> [a] Source #

toList for quadruple

module Data.Tuple

data Solo a #

Solo is the canonical lifted 1-tuple, just like (,) is the canonical lifted 2-tuple (pair) and (,,) is the canonical lifted 3-tuple (triple).

The most important feature of Solo is that it is possible to force its "outside" (usually by pattern matching) without forcing its "inside", because it is defined as a datatype rather than a newtype. One situation where this can be useful is when writing a function to extract a value from a data structure. Suppose you write an implementation of arrays and offer only this function to index into them:

index :: Array a -> Int -> a

Now imagine that someone wants to extract a value from an array and store it in a lazy-valued finite map/dictionary:

insert "hello" (arr index 12) m

This can actually lead to a space leak. The value is not actually extracted from the array until that value (now buried in a map) is forced. That means the entire array may be kept live by just that value! Often, the solution is to use a strict map, or to force the value before storing it, but for some purposes that's undesirable.

One common solution is to include an indexing function that can produce its result in an arbitrary Applicative context:

indexA :: Applicative f => Array a -> Int -> f a

When using indexA in a pure context, Solo serves as a handy Applicative functor to hold the result. You could write a non-leaky version of the above example thus:

case arr indexA 12 of
  Solo a -> insert "hello" a m

While such simple extraction functions are the most common uses for unary tuples, they can also be useful for fine-grained control of strict-spined data structure traversals, and for unifying the implementations of lazy and strict mapping functions.

Constructors

MkSolo a 

Bundled Patterns

pattern Solo :: a -> (a) 

Instances

Instances details
Foldable Solo

Since: base-4.15

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Solo m -> m #

foldMap :: Monoid m => (a -> m) -> Solo a -> m #

foldMap' :: Monoid m => (a -> m) -> Solo a -> m #

foldr :: (a -> b -> b) -> b -> Solo a -> b #

foldr' :: (a -> b -> b) -> b -> Solo a -> b #

foldl :: (b -> a -> b) -> b -> Solo a -> b #

foldl' :: (b -> a -> b) -> b -> Solo a -> b #

foldr1 :: (a -> a -> a) -> Solo a -> a #

foldl1 :: (a -> a -> a) -> Solo a -> a #

toList :: Solo a -> [a] #

null :: Solo a -> Bool #

length :: Solo a -> Int #

elem :: Eq a => a -> Solo a -> Bool #

maximum :: Ord a => Solo a -> a #

minimum :: Ord a => Solo a -> a #

sum :: Num a => Solo a -> a #

product :: Num a => Solo a -> a #

Eq1 Solo

Since: base-4.15

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Solo a -> Solo b -> Bool #

Ord1 Solo

Since: base-4.15

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Solo a -> Solo b -> Ordering #

Read1 Solo

Since: base-4.15

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Solo a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Solo a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Solo a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Solo a] #

Show1 Solo

Since: base-4.15

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Solo a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Solo a] -> ShowS #

Traversable Solo

Since: base-4.15

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Solo a -> f (Solo b) #

sequenceA :: Applicative f => Solo (f a) -> f (Solo a) #

mapM :: Monad m => (a -> m b) -> Solo a -> m (Solo b) #

sequence :: Monad m => Solo (m a) -> m (Solo a) #

Applicative Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

pure :: a -> Solo a #

(<*>) :: Solo (a -> b) -> Solo a -> Solo b #

liftA2 :: (a -> b -> c) -> Solo a -> Solo b -> Solo c #

(*>) :: Solo a -> Solo b -> Solo b #

(<*) :: Solo a -> Solo b -> Solo a #

Functor Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Solo a -> Solo b #

(<$) :: a -> Solo b -> Solo a #

Monad Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

(>>=) :: Solo a -> (a -> Solo b) -> Solo b #

(>>) :: Solo a -> Solo b -> Solo b #

return :: a -> Solo a #

NFData1 Solo

Since: deepseq-1.4.6.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Solo a -> () #

Hashable1 Solo 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Solo a -> Int #

Generic1 Solo 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Solo :: k -> Type #

Methods

from1 :: forall (a :: k). Solo a -> Rep1 Solo a #

to1 :: forall (a :: k). Rep1 Solo a -> Solo a #

TupleCons a (b) (a, b) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCons :: a -> (b) -> (a, b) Source #

Monoid a => Monoid (a)

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

mempty :: (a) #

mappend :: (a) -> (a) -> (a) #

mconcat :: [(a)] -> (a) #

Semigroup a => Semigroup (a)

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

(<>) :: (a) -> (a) -> (a) #

sconcat :: NonEmpty (a) -> (a) #

stimes :: Integral b => b -> (a) -> (a) #

Bounded a => Bounded (a) 
Instance details

Defined in GHC.Enum

Methods

minBound :: (a) #

maxBound :: (a) #

Enum a => Enum (a) 
Instance details

Defined in GHC.Enum

Methods

succ :: (a) -> (a) #

pred :: (a) -> (a) #

toEnum :: Int -> (a) #

fromEnum :: (a) -> Int #

enumFrom :: (a) -> [(a)] #

enumFromThen :: (a) -> (a) -> [(a)] #

enumFromTo :: (a) -> (a) -> [(a)] #

enumFromThenTo :: (a) -> (a) -> (a) -> [(a)] #

Generic (a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a) :: Type -> Type #

Methods

from :: (a) -> Rep (a) x #

to :: Rep (a) x -> (a) #

Read a => Read (a)

Since: base-4.15

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a) #

readList :: ReadS [(a)] #

readPrec :: ReadPrec (a) #

readListPrec :: ReadPrec [(a)] #

Show a => Show (a)

Since: base-4.15

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a) -> ShowS #

show :: (a) -> String #

showList :: [(a)] -> ShowS #

NFData a => NFData (a)

Since: deepseq-1.4.6.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a) -> () #

Eq a => Eq (a) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a) -> (a) -> Bool #

(/=) :: (a) -> (a) -> Bool #

Ord a => Ord (a) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a) -> (a) -> Ordering #

(<) :: (a) -> (a) -> Bool #

(<=) :: (a) -> (a) -> Bool #

(>) :: (a) -> (a) -> Bool #

(>=) :: (a) -> (a) -> Bool #

max :: (a) -> (a) -> (a) #

min :: (a) -> (a) -> (a) #

Hashable a => Hashable (a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a) -> Int #

hash :: (a) -> Int #

ReorderTuple (a) (a) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a) -> (a) Source #

TupleTail (a, b) (b) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleTail :: (a, b) -> (b) Source #

type Rep1 Solo

Since: base-4.15

Instance details

Defined in GHC.Generics

type Rep1 Solo = D1 ('MetaData "Solo" "GHC.Tuple.Prim" "ghc-prim" 'False) (C1 ('MetaCons "MkSolo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (a)

Since: base-4.15

Instance details

Defined in GHC.Generics

type Rep (a) = D1 ('MetaData "Solo" "GHC.Tuple.Prim" "ghc-prim" 'False) (C1 ('MetaCons "MkSolo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

type family Tuple xs = t | t -> xs where ... Source #

Boxed tuple

TODO: put this family into GHC

Equations

Tuple '[] = () 
Tuple '[a] = Solo a 
Tuple '[a, b] = (a, b) 
Tuple '[a, b, c] = (a, b, c) 
Tuple '[a, b, c, d] = (a, b, c, d) 
Tuple '[a, b, c, d, e] = (a, b, c, d, e) 
Tuple '[a, b, c, d, e, f] = (a, b, c, d, e, f) 
Tuple '[a, b, c, d, e, f, g] = (a, b, c, d, e, f, g) 
Tuple '[a, b, c, d, e, f, g, h] = (a, b, c, d, e, f, g, h) 
Tuple '[a, b, c, d, e, f, g, h, i] = (a, b, c, d, e, f, g, h, i) 
Tuple '[a, b, c, d, e, f, g, h, i, j] = (a, b, c, d, e, f, g, h, i, j) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k] = (a, b, c, d, e, f, g, h, i, j, k) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l] = (a, b, c, d, e, f, g, h, i, j, k, l) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m] = (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) 
Tuple '[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z] = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) 

type family Tuple# xs = t | t -> xs where ... Source #

Unboxed tuple

TODO: put this family into GHC

Equations

Tuple# '[] = (# #) 
Tuple# '[a] = (# a #) 
Tuple# '[a, b] = (# a, b #) 
Tuple# '[a, b, c] = (# a, b, c #) 
Tuple# '[a, b, c, d] = (# a, b, c, d #) 
Tuple# '[a, b, c, d, e] = (# a, b, c, d, e #) 
Tuple# '[a, b, c, d, e, f] = (# a, b, c, d, e, f #) 
Tuple# '[a, b, c, d, e, f, g] = (# a, b, c, d, e, f, g #) 
Tuple# '[a, b, c, d, e, f, g, h] = (# a, b, c, d, e, f, g, h #) 
Tuple# '[a, b, c, d, e, f, g, h, i] = (# a, b, c, d, e, f, g, h, i #) 

type family TypeReps xs where ... Source #

Equations

TypeReps '[] = '[] 
TypeReps ((a :: TYPE k) ': as) = k ': TypeReps as 

class ExtractTuple (n :: Nat) xs where Source #

Extract a tuple value statically

Methods

tupleN :: Tuple xs -> Index n xs Source #

Extract a tuple value by type-level index

Instances

Instances details
ExtractTuple 0 '[a] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[a] -> Index 0 '[a] Source #

ExtractTuple 0 '[e0, e1, e2, e3, e4, e5, e6, e7] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6, e7] -> Index 0 '[e0, e1, e2, e3, e4, e5, e6, e7] Source #

ExtractTuple 0 '[e0, e1, e2, e3, e4, e5, e6] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6] -> Index 0 '[e0, e1, e2, e3, e4, e5, e6] Source #

ExtractTuple 0 '[e0, e1, e2, e3, e4, e5] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5] -> Index 0 '[e0, e1, e2, e3, e4, e5] Source #

ExtractTuple 0 '[e0, e1, e2, e3, e4] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4] -> Index 0 '[e0, e1, e2, e3, e4] Source #

ExtractTuple 0 '[e0, e1, e2, e3] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3] -> Index 0 '[e0, e1, e2, e3] Source #

ExtractTuple 0 '[e0, e1, e2] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2] -> Index 0 '[e0, e1, e2] Source #

ExtractTuple 0 '[e0, e1] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1] -> Index 0 '[e0, e1] Source #

ExtractTuple 1 '[e0, e1, e2, e3, e4, e5, e6, e7] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6, e7] -> Index 1 '[e0, e1, e2, e3, e4, e5, e6, e7] Source #

ExtractTuple 1 '[e0, e1, e2, e3, e4, e5, e6] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6] -> Index 1 '[e0, e1, e2, e3, e4, e5, e6] Source #

ExtractTuple 1 '[e0, e1, e2, e3, e4, e5] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5] -> Index 1 '[e0, e1, e2, e3, e4, e5] Source #

ExtractTuple 1 '[e0, e1, e2, e3, e4] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4] -> Index 1 '[e0, e1, e2, e3, e4] Source #

ExtractTuple 1 '[e0, e1, e2, e3] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3] -> Index 1 '[e0, e1, e2, e3] Source #

ExtractTuple 1 '[e0, e1, e2] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2] -> Index 1 '[e0, e1, e2] Source #

ExtractTuple 1 '[e0, e1] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1] -> Index 1 '[e0, e1] Source #

ExtractTuple 2 '[e0, e1, e2, e3, e4, e5, e6, e7] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6, e7] -> Index 2 '[e0, e1, e2, e3, e4, e5, e6, e7] Source #

ExtractTuple 2 '[e0, e1, e2, e3, e4, e5, e6] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6] -> Index 2 '[e0, e1, e2, e3, e4, e5, e6] Source #

ExtractTuple 2 '[e0, e1, e2, e3, e4, e5] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5] -> Index 2 '[e0, e1, e2, e3, e4, e5] Source #

ExtractTuple 2 '[e0, e1, e2, e3, e4] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4] -> Index 2 '[e0, e1, e2, e3, e4] Source #

ExtractTuple 2 '[e0, e1, e2, e3] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3] -> Index 2 '[e0, e1, e2, e3] Source #

ExtractTuple 2 '[e0, e1, e2] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2] -> Index 2 '[e0, e1, e2] Source #

ExtractTuple 3 '[e0, e1, e2, e3, e4, e5, e6, e7] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6, e7] -> Index 3 '[e0, e1, e2, e3, e4, e5, e6, e7] Source #

ExtractTuple 3 '[e0, e1, e2, e3, e4, e5, e6] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6] -> Index 3 '[e0, e1, e2, e3, e4, e5, e6] Source #

ExtractTuple 3 '[e0, e1, e2, e3, e4, e5] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5] -> Index 3 '[e0, e1, e2, e3, e4, e5] Source #

ExtractTuple 3 '[e0, e1, e2, e3, e4] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4] -> Index 3 '[e0, e1, e2, e3, e4] Source #

ExtractTuple 3 '[e0, e1, e2, e3] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3] -> Index 3 '[e0, e1, e2, e3] Source #

ExtractTuple 4 '[e0, e1, e2, e3, e4, e5, e6, e7] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6, e7] -> Index 4 '[e0, e1, e2, e3, e4, e5, e6, e7] Source #

ExtractTuple 4 '[e0, e1, e2, e3, e4, e5, e6] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6] -> Index 4 '[e0, e1, e2, e3, e4, e5, e6] Source #

ExtractTuple 4 '[e0, e1, e2, e3, e4, e5] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5] -> Index 4 '[e0, e1, e2, e3, e4, e5] Source #

ExtractTuple 4 '[e0, e1, e2, e3, e4] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4] -> Index 4 '[e0, e1, e2, e3, e4] Source #

ExtractTuple 5 '[e0, e1, e2, e3, e4, e5, e6, e7] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6, e7] -> Index 5 '[e0, e1, e2, e3, e4, e5, e6, e7] Source #

ExtractTuple 5 '[e0, e1, e2, e3, e4, e5, e6] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6] -> Index 5 '[e0, e1, e2, e3, e4, e5, e6] Source #

ExtractTuple 5 '[e0, e1, e2, e3, e4, e5] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5] -> Index 5 '[e0, e1, e2, e3, e4, e5] Source #

ExtractTuple 6 '[e0, e1, e2, e3, e4, e5, e6, e7] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6, e7] -> Index 6 '[e0, e1, e2, e3, e4, e5, e6, e7] Source #

ExtractTuple 6 '[e0, e1, e2, e3, e4, e5, e6] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6] -> Index 6 '[e0, e1, e2, e3, e4, e5, e6] Source #

ExtractTuple 7 '[e0, e1, e2, e3, e4, e5, e6, e7] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleN :: Tuple '[e0, e1, e2, e3, e4, e5, e6, e7] -> Index 7 '[e0, e1, e2, e3, e4, e5, e6, e7] Source #

class TupleCon xs where Source #

Create a Tuple

Methods

tupleCon :: TupleFun (Tuple xs) xs Source #

Create a Tuple

Instances

Instances details
TupleCon ('[] :: [Type]) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCon :: TupleFun (Tuple '[]) '[] Source #

TupleCon '[a, b, c, d, e, f] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCon :: TupleFun (Tuple '[a, b, c, d, e, f]) '[a, b, c, d, e, f] Source #

TupleCon '[a, b, c, d, e] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCon :: TupleFun (Tuple '[a, b, c, d, e]) '[a, b, c, d, e] Source #

TupleCon '[a, b, c, d] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCon :: TupleFun (Tuple '[a, b, c, d]) '[a, b, c, d] Source #

TupleCon '[a, b, c] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCon :: TupleFun (Tuple '[a, b, c]) '[a, b, c] Source #

TupleCon '[a, b] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCon :: TupleFun (Tuple '[a, b]) '[a, b] Source #

TupleCon '[a] Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCon :: TupleFun (Tuple '[a]) '[a] Source #

tupleHead :: forall xs. ExtractTuple 0 xs => Tuple xs -> Index 0 xs Source #

Get first element of the tuple

class TupleTail ts ts' | ts -> ts' where Source #

Methods

tupleTail :: ts -> ts' Source #

Instances

Instances details
TupleTail (a, b) (b) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleTail :: (a, b) -> (b) Source #

TupleTail (a, b, c) (b, c) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleTail :: (a, b, c) -> (b, c) Source #

TupleTail (a, b, c, d) (b, c, d) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleTail :: (a, b, c, d) -> (b, c, d) Source #

TupleTail (a, b, c, d, e) (b, c, d, e) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleTail :: (a, b, c, d, e) -> (b, c, d, e) Source #

TupleTail (a, b, c, d, e, f) (b, c, d, e, f) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleTail :: (a, b, c, d, e, f) -> (b, c, d, e, f) Source #

class TupleCons t ts ts' | t ts -> ts' where Source #

Methods

tupleCons :: t -> ts -> ts' Source #

Instances

Instances details
TupleCons a (b) (a, b) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCons :: a -> (b) -> (a, b) Source #

TupleCons a (b, c) (a, b, c) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCons :: a -> (b, c) -> (a, b, c) Source #

TupleCons a (b, c, d) (a, b, c, d) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCons :: a -> (b, c, d) -> (a, b, c, d) Source #

TupleCons a (b, c, d, e) (a, b, c, d, e) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCons :: a -> (b, c, d, e) -> (a, b, c, d, e) Source #

TupleCons a (b, c, d, e, f) (a, b, c, d, e, f) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleCons :: a -> (b, c, d, e, f) -> (a, b, c, d, e, f) Source #

class ReorderTuple t1 t2 where Source #

Reorder tuple elements

Methods

tupleReorder :: t1 -> t2 Source #

Reorder tuple elements

Instances

Instances details
ReorderTuple (a) (a) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a) -> (a) Source #

ReorderTuple (a, b) (a, b) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b) -> (a, b) Source #

ReorderTuple (a, b) (b, a) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b) -> (b, a) Source #

ReorderTuple (a, b, c) (a, b, c) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c) -> (a, b, c) Source #

ReorderTuple (a, b, c) (a, c, b) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c) -> (a, c, b) Source #

ReorderTuple (a, b, c) (b, a, c) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c) -> (b, a, c) Source #

ReorderTuple (a, b, c) (b, c, a) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c) -> (b, c, a) Source #

ReorderTuple (a, b, c) (c, a, b) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c) -> (c, a, b) Source #

ReorderTuple (a, b, c) (c, b, a) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c) -> (c, b, a) Source #

ReorderTuple (a, b, c, d) (a, b, c, d) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d) -> (a, b, c, d) Source #

ReorderTuple (b, c, d) (x, y, z) => ReorderTuple (a, b, c, d) (a, x, y, z) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d) -> (a, x, y, z) Source #

ReorderTuple (a, c, d) (x, y, z) => ReorderTuple (a, b, c, d) (x, b, y, z) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d) -> (x, b, y, z) Source #

ReorderTuple (a, b, d) (x, y, z) => ReorderTuple (a, b, c, d) (x, y, c, z) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d) -> (x, y, c, z) Source #

ReorderTuple (a, b, c) (x, y, z) => ReorderTuple (a, b, c, d) (x, y, z, d) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d) -> (x, y, z, d) Source #

ReorderTuple (a, b, c, d, e) (a, b, c, d, e) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e) -> (a, b, c, d, e) Source #

ReorderTuple (b, c, d, e) (x, y, z, w) => ReorderTuple (a, b, c, d, e) (a, x, y, z, w) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e) -> (a, x, y, z, w) Source #

ReorderTuple (a, c, d, e) (x, y, z, w) => ReorderTuple (a, b, c, d, e) (x, b, y, z, w) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e) -> (x, b, y, z, w) Source #

ReorderTuple (a, b, d, e) (x, y, z, w) => ReorderTuple (a, b, c, d, e) (x, y, c, z, w) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e) -> (x, y, c, z, w) Source #

ReorderTuple (a, b, c, e) (x, y, z, w) => ReorderTuple (a, b, c, d, e) (x, y, z, d, w) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e) -> (x, y, z, d, w) Source #

ReorderTuple (a, b, c, d) (x, y, z, w) => ReorderTuple (a, b, c, d, e) (x, y, z, w, e) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e) -> (x, y, z, w, e) Source #

ReorderTuple (a, b, c, d, e, f) (a, b, c, d, e, f) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

ReorderTuple (b, c, d, e, f) (x, y, z, w, v) => ReorderTuple (a, b, c, d, e, f) (a, x, y, z, w, v) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f) -> (a, x, y, z, w, v) Source #

ReorderTuple (a, c, d, e, f) (x, y, z, w, v) => ReorderTuple (a, b, c, d, e, f) (x, b, y, z, w, v) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f) -> (x, b, y, z, w, v) Source #

ReorderTuple (a, b, d, e, f) (x, y, z, w, v) => ReorderTuple (a, b, c, d, e, f) (x, y, c, z, w, v) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f) -> (x, y, c, z, w, v) Source #

ReorderTuple (a, b, c, e, f) (x, y, z, w, v) => ReorderTuple (a, b, c, d, e, f) (x, y, z, d, w, v) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f) -> (x, y, z, d, w, v) Source #

ReorderTuple (a, b, c, d, f) (x, y, z, w, v) => ReorderTuple (a, b, c, d, e, f) (x, y, z, w, e, v) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f) -> (x, y, z, w, e, v) Source #

ReorderTuple (a, b, c, d, e) (x, y, z, w, v) => ReorderTuple (a, b, c, d, e, f) (x, y, z, w, v, f) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f) -> (x, y, z, w, v, f) Source #

ReorderTuple (a, b, c, d, e, f, g) (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

ReorderTuple (b, c, d, e, f, g) (x, y, z, w, v, u) => ReorderTuple (a, b, c, d, e, f, g) (a, x, y, z, w, v, u) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g) -> (a, x, y, z, w, v, u) Source #

ReorderTuple (a, c, d, e, f, g) (x, y, z, w, v, u) => ReorderTuple (a, b, c, d, e, f, g) (x, b, y, z, w, v, u) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g) -> (x, b, y, z, w, v, u) Source #

ReorderTuple (a, b, d, e, f, g) (x, y, z, w, v, u) => ReorderTuple (a, b, c, d, e, f, g) (x, y, c, z, w, v, u) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g) -> (x, y, c, z, w, v, u) Source #

ReorderTuple (a, b, c, e, f, g) (x, y, z, w, v, u) => ReorderTuple (a, b, c, d, e, f, g) (x, y, z, d, w, v, u) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g) -> (x, y, z, d, w, v, u) Source #

ReorderTuple (a, b, c, d, f, g) (x, y, z, w, v, u) => ReorderTuple (a, b, c, d, e, f, g) (x, y, z, w, e, v, u) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g) -> (x, y, z, w, e, v, u) Source #

ReorderTuple (a, b, c, d, e, g) (x, y, z, w, v, u) => ReorderTuple (a, b, c, d, e, f, g) (x, y, z, w, v, f, u) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g) -> (x, y, z, w, v, f, u) Source #

ReorderTuple (a, b, c, d, e, f) (x, y, z, w, v, u) => ReorderTuple (a, b, c, d, e, f, g) (x, y, z, w, v, u, g) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g) -> (x, y, z, w, v, u, g) Source #

ReorderTuple (a, b, c, d, e, f, g, h) (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

ReorderTuple (a, b, c, d, e, f, g, h, i) (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #

ReorderTuple (a, b, c, d, e, f, g, h, i, j) (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Data.Variant.Tuple

Methods

tupleReorder :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #