foundation-0.0.22: 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.

Associated Types

type NthTy n a Source #

Methods

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

Instances
Nthable 1 (a, b) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

type NthTy 1 (a, b) :: Type Source #

Methods

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

Nthable 1 (Tuple2 a b) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

type NthTy 1 (Tuple2 a b) :: Type Source #

Methods

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

Nthable 2 (a, b) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

type NthTy 2 (a, b) :: Type Source #

Methods

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

Nthable 2 (Tuple2 a b) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

type NthTy 2 (Tuple2 a b) :: Type Source #

Methods

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

Nthable 1 (a, b, c) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 1 (Tuple3 a b c) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 2 (a, b, c) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 2 (Tuple3 a b c) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 3 (a, b, c) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 3 (Tuple3 a b c) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

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

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 1 (Tuple4 a b c d) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

type NthTy 1 (Tuple4 a b c d) :: Type 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 # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 2 (Tuple4 a b c d) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

type NthTy 2 (Tuple4 a b c d) :: Type 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 # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 3 (Tuple4 a b c d) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

type NthTy 3 (Tuple4 a b c d) :: Type 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 # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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

Nthable 4 (Tuple4 a b c d) Source # 
Instance details

Defined in Foundation.Tuple.Nth

Associated Types

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

Methods

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