foundation-0.0.7: Alternative prelude with batteries and no dependencies

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Foundation.Tuple.Nth

Description

a Generalized version of Fstable, Sndable, ..

Using this module is limited to GHC 7.10 and above.

Synopsis

Documentation

class KnownNat n => Nthable n a where Source #

A generalized version of indexed accessor allowing access to tuples n'th element.

Indexing starts at 1, as fst is used to get first element.

Minimal complete definition

nth

Associated Types

type NthTy n a Source #

Methods

nth :: proxy n -> a -> NthTy n a Source #

Instances

Nthable 1 (a, b) Source # 

Associated Types

type NthTy (1 :: Nat) (a, b) :: * Source #

Methods

nth :: proxy 1 -> (a, b) -> NthTy 1 (a, b) Source #

Nthable 1 (Tuple2 a b) Source # 

Associated Types

type NthTy (1 :: Nat) (Tuple2 a b) :: * Source #

Methods

nth :: proxy 1 -> Tuple2 a b -> NthTy 1 (Tuple2 a b) Source #

Nthable 2 (a, b) Source # 

Associated Types

type NthTy (2 :: Nat) (a, b) :: * Source #

Methods

nth :: proxy 2 -> (a, b) -> NthTy 2 (a, b) Source #

Nthable 2 (Tuple2 a b) Source # 

Associated Types

type NthTy (2 :: Nat) (Tuple2 a b) :: * Source #

Methods

nth :: proxy 2 -> Tuple2 a b -> NthTy 2 (Tuple2 a b) Source #

Nthable 1 (a, b, c) Source # 

Associated Types

type NthTy (1 :: Nat) (a, b, c) :: * Source #

Methods

nth :: proxy 1 -> (a, b, c) -> NthTy 1 (a, b, c) Source #

Nthable 1 (Tuple3 a b c) Source # 

Associated Types

type NthTy (1 :: Nat) (Tuple3 a b c) :: * Source #

Methods

nth :: proxy 1 -> Tuple3 a b c -> NthTy 1 (Tuple3 a b c) Source #

Nthable 2 (a, b, c) Source # 

Associated Types

type NthTy (2 :: Nat) (a, b, c) :: * Source #

Methods

nth :: proxy 2 -> (a, b, c) -> NthTy 2 (a, b, c) Source #

Nthable 2 (Tuple3 a b c) Source # 

Associated Types

type NthTy (2 :: Nat) (Tuple3 a b c) :: * Source #

Methods

nth :: proxy 2 -> Tuple3 a b c -> NthTy 2 (Tuple3 a b c) Source #

Nthable 3 (a, b, c) Source # 

Associated Types

type NthTy (3 :: Nat) (a, b, c) :: * Source #

Methods

nth :: proxy 3 -> (a, b, c) -> NthTy 3 (a, b, c) Source #

Nthable 3 (Tuple3 a b c) Source # 

Associated Types

type NthTy (3 :: Nat) (Tuple3 a b c) :: * Source #

Methods

nth :: proxy 3 -> Tuple3 a b c -> NthTy 3 (Tuple3 a b c) Source #

Nthable 1 (a, b, c, d) Source # 

Associated Types

type NthTy (1 :: Nat) (a, b, c, d) :: * Source #

Methods

nth :: proxy 1 -> (a, b, c, d) -> NthTy 1 (a, b, c, d) Source #

Nthable 1 (Tuple4 a b c d) Source # 

Associated Types

type NthTy (1 :: Nat) (Tuple4 a b c d) :: * Source #

Methods

nth :: proxy 1 -> Tuple4 a b c d -> NthTy 1 (Tuple4 a b c d) Source #

Nthable 2 (a, b, c, d) Source # 

Associated Types

type NthTy (2 :: Nat) (a, b, c, d) :: * Source #

Methods

nth :: proxy 2 -> (a, b, c, d) -> NthTy 2 (a, b, c, d) Source #

Nthable 2 (Tuple4 a b c d) Source # 

Associated Types

type NthTy (2 :: Nat) (Tuple4 a b c d) :: * Source #

Methods

nth :: proxy 2 -> Tuple4 a b c d -> NthTy 2 (Tuple4 a b c d) Source #

Nthable 3 (a, b, c, d) Source # 

Associated Types

type NthTy (3 :: Nat) (a, b, c, d) :: * Source #

Methods

nth :: proxy 3 -> (a, b, c, d) -> NthTy 3 (a, b, c, d) Source #

Nthable 3 (Tuple4 a b c d) Source # 

Associated Types

type NthTy (3 :: Nat) (Tuple4 a b c d) :: * Source #

Methods

nth :: proxy 3 -> Tuple4 a b c d -> NthTy 3 (Tuple4 a b c d) Source #

Nthable 4 (a, b, c, d) Source # 

Associated Types

type NthTy (4 :: Nat) (a, b, c, d) :: * Source #

Methods

nth :: proxy 4 -> (a, b, c, d) -> NthTy 4 (a, b, c, d) Source #

Nthable 4 (Tuple4 a b c d) Source # 

Associated Types

type NthTy (4 :: Nat) (Tuple4 a b c d) :: * Source #

Methods

nth :: proxy 4 -> Tuple4 a b c d -> NthTy 4 (Tuple4 a b c d) Source #