Module

# Heterogeneous.Mapping

- Package
- purescript-heterogeneous
- Repository
- natefaubion/purescript-heterogeneous

### #MappingWithIndex Source

`class MappingWithIndex f i a b | f i a -> b where`

#### Members

`mappingWithIndex :: f -> i -> a -> b`

#### Instances

`(Mapping f a b) => MappingWithIndex (ConstMapping f) ix a b`

### #ConstMapping Source

`newtype ConstMapping f`

#### Constructors

#### Instances

`(Mapping f a b) => MappingWithIndex (ConstMapping f) ix a b`

### #HMap Source

`class HMap f a b | f a -> b where`

#### Members

`hmap :: f -> a -> b`

#### Instances

`(Functor f, Mapping fn a b) => HMap fn (App f a) (App f b)`

`(RowToList rin rl, MapRecordWithIndex rl (ConstMapping fn) rin rout) => HMap fn (Record rin) (Record rout)`

`(Mapping fn a a', Mapping fn b b') => HMap fn (Tuple a b) (Tuple a' b')`

`(Mapping fn a a', Mapping fn b b') => HMap fn (Either a b) (Either a' b')`

`(RowToList rin rl, MapVariantWithIndex rl (ConstMapping fn) rin rout) => HMap fn (Variant rin) (Variant rout)`

`(RowToList rin rl, MapVariantFWithIndex rl (ConstMapping fn) rin rout x y) => HMap fn (VariantF rin x) (VariantF rout y)`

### #HMapWithIndex Source

`class HMapWithIndex f a b | f a -> b where`

#### Members

`hmapWithIndex :: f -> a -> b`

#### Instances

`(FunctorWithIndex i f, MappingWithIndex fn i a b) => HMapWithIndex fn (App f a) (App f b)`

`(RowToList rin rl, MapRecordWithIndex rl fn rin rout) => HMapWithIndex fn (Record rin) (Record rout)`

`(RowToList rin rl, MapVariantWithIndex rl fn rin rout) => HMapWithIndex fn (Variant rin) (Variant rout)`

`(RowToList rin rl, MapVariantFWithIndex rl fn rin rout x y) => HMapWithIndex fn (VariantF rin x) (VariantF rout y)`

### #MapRecordWithIndex Source

`class MapRecordWithIndex (xs :: RowList) f (as :: # Type) (bs :: # Type) | xs f -> bs, xs -> as where`

#### Members

`mapRecordWithIndexBuilder :: RLProxy xs -> f -> Builder (Record as) (Record bs)`

#### Instances

`(IsSymbol sym, MappingWithIndex f (SProxy sym) a b, MapRecordWithIndex rest f as bs', Cons sym a bx bs', Cons sym b bx bs) => MapRecordWithIndex (Cons sym a rest) f as bs`

`MapRecordWithIndex Nil fn as as`

### #MapVariantWithIndex Source

`class MapVariantWithIndex (xs :: RowList) f (as :: # Type) (bs :: # Type) | xs f -> bs, xs -> as where`

#### Members

`mapVariantWithIndex :: RLProxy xs -> f -> Variant as -> Variant bs`

#### Instances

`(IsSymbol sym, Cons sym a r1 r2, Cons sym b r3 r4, MappingWithIndex fn (SProxy sym) a b, MapVariantWithIndex rest fn r1 r4) => MapVariantWithIndex (Cons sym a rest) fn r2 r4`

`MapVariantWithIndex Nil fn () r`

### #MapVariantFWithIndex Source

`class MapVariantFWithIndex (xs :: RowList) f (as :: # Type) (bs :: # Type) x y | xs f x -> as bs y where`

#### Members

`mapVariantFWithIndex :: RLProxy xs -> f -> VariantF as x -> VariantF bs y`

#### Instances

`(IsSymbol sym, Cons sym (FProxy a) r1 r2, Cons sym (FProxy b) r3 r4, MappingWithIndex fn (SProxy sym) (a x) (b y), MapVariantFWithIndex rest fn r1 r4 x y, Functor b) => MapVariantFWithIndex (Cons sym (FProxy a) rest) fn r2 r4 x y`

`MapVariantFWithIndex Nil fn () r x y`