semialign-1.2.0.1: Align and Zip type-classes from the common Semialign ancestor.
Safe HaskellSafe
LanguageHaskell2010

Data.Semialign.Indexed

Description

Zipping and aligning of indexed functors.

Synopsis

Documentation

class (FunctorWithIndex i f, Semialign f) => SemialignWithIndex i f | f -> i where Source #

Indexed version of Semialign.

Since: 1.2

Minimal complete definition

Nothing

Methods

ialignWith :: (i -> These a b -> c) -> f a -> f b -> f c Source #

Analogous to alignWith, but also provides an index.

Instances

Instances details
SemialignWithIndex Int [] Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (Int -> These a b -> c) -> [a] -> [b] -> [c] Source #

SemialignWithIndex Int ZipList Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (Int -> These a b -> c) -> ZipList a -> ZipList b -> ZipList c Source #

SemialignWithIndex Int NonEmpty Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (Int -> These a b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #

SemialignWithIndex Int IntMap Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (Int -> These a b -> c) -> IntMap a -> IntMap b -> IntMap c Source #

SemialignWithIndex Int Seq Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (Int -> These a b -> c) -> Seq a -> Seq b -> Seq c Source #

SemialignWithIndex Int Vector Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (Int -> These a b -> c) -> Vector a -> Vector b -> Vector c Source #

SemialignWithIndex () Maybe Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (() -> These a b -> c) -> Maybe a -> Maybe b -> Maybe c Source #

SemialignWithIndex () Identity Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (() -> These a b -> c) -> Identity a -> Identity b -> Identity c Source #

(Eq k, Hashable k) => SemialignWithIndex k (HashMap k) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (k -> These a b -> c) -> HashMap k a -> HashMap k b -> HashMap k c Source #

Ord k => SemialignWithIndex k (Map k) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (k -> These a b -> c) -> Map k a -> Map k b -> Map k c Source #

SemialignWithIndex Void (Proxy :: Type -> Type) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (Void -> These a b -> c) -> Proxy a -> Proxy b -> Proxy c Source #

SemialignWithIndex () (Tagged b) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (() -> These a b0 -> c) -> Tagged b a -> Tagged b b0 -> Tagged b c Source #

SemialignWithIndex e ((->) e :: Type -> Type) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (e -> These a b -> c) -> (e -> a) -> (e -> b) -> e -> c Source #

(SemialignWithIndex i f, SemialignWithIndex j g) => SemialignWithIndex (Either i j) (Product f g) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: (Either i j -> These a b -> c) -> Product f g a -> Product f g b -> Product f g c Source #

(SemialignWithIndex i f, SemialignWithIndex j g) => SemialignWithIndex (i, j) (Compose f g) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

ialignWith :: ((i, j) -> These a b -> c) -> Compose f g a -> Compose f g b -> Compose f g c Source #

class (SemialignWithIndex i f, Zip f) => ZipWithIndex i f | f -> i where Source #

Indexed version of Zip.

Since: 1.2

Minimal complete definition

Nothing

Methods

izipWith :: (i -> a -> b -> c) -> f a -> f b -> f c Source #

Analogous to zipWith, but also provides an index.

Instances

Instances details
ZipWithIndex Int [] Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (Int -> a -> b -> c) -> [a] -> [b] -> [c] Source #

ZipWithIndex Int ZipList Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (Int -> a -> b -> c) -> ZipList a -> ZipList b -> ZipList c Source #

ZipWithIndex Int NonEmpty Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (Int -> a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #

ZipWithIndex Int IntMap Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (Int -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c Source #

ZipWithIndex Int Seq Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (Int -> a -> b -> c) -> Seq a -> Seq b -> Seq c Source #

ZipWithIndex Int Vector Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (Int -> a -> b -> c) -> Vector a -> Vector b -> Vector c Source #

ZipWithIndex () Maybe Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (() -> a -> b -> c) -> Maybe a -> Maybe b -> Maybe c Source #

ZipWithIndex () Identity Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (() -> a -> b -> c) -> Identity a -> Identity b -> Identity c Source #

(Eq k, Hashable k) => ZipWithIndex k (HashMap k) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (k -> a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c Source #

Ord k => ZipWithIndex k (Map k) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (k -> a -> b -> c) -> Map k a -> Map k b -> Map k c Source #

ZipWithIndex Void (Proxy :: Type -> Type) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (Void -> a -> b -> c) -> Proxy a -> Proxy b -> Proxy c Source #

ZipWithIndex () (Tagged b) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (() -> a -> b0 -> c) -> Tagged b a -> Tagged b b0 -> Tagged b c Source #

ZipWithIndex e ((->) e :: Type -> Type) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (e -> a -> b -> c) -> (e -> a) -> (e -> b) -> e -> c Source #

(ZipWithIndex i f, ZipWithIndex j g) => ZipWithIndex (Either i j) (Product f g) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: (Either i j -> a -> b -> c) -> Product f g a -> Product f g b -> Product f g c Source #

(ZipWithIndex i f, ZipWithIndex j g) => ZipWithIndex (i, j) (Compose f g) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: ((i, j) -> a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c Source #

class (ZipWithIndex i f, Repeat f) => RepeatWithIndex i f | f -> i where Source #

Indexed version of Repeat.

Since: 1.2

Minimal complete definition

Nothing

Methods

irepeat :: (i -> a) -> f a Source #

Analogous to repeat, but also provides an index.

This should be the same as tabulate for representable functors.

Instances

Instances details
RepeatWithIndex Int [] Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (Int -> a) -> [a] Source #

RepeatWithIndex Int ZipList Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (Int -> a) -> ZipList a Source #

RepeatWithIndex Int NonEmpty Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (Int -> a) -> NonEmpty a Source #

RepeatWithIndex () Maybe Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (() -> a) -> Maybe a Source #

RepeatWithIndex () Identity Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (() -> a) -> Identity a Source #

RepeatWithIndex Void (Proxy :: Type -> Type) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (Void -> a) -> Proxy a Source #

RepeatWithIndex () (Tagged b) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (() -> a) -> Tagged b a Source #

RepeatWithIndex e ((->) e :: Type -> Type) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (e -> a) -> e -> a Source #

(RepeatWithIndex i f, RepeatWithIndex j g) => RepeatWithIndex (Either i j) (Product f g) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: (Either i j -> a) -> Product f g a Source #

(RepeatWithIndex i f, RepeatWithIndex j g) => RepeatWithIndex (i, j) (Compose f g) Source # 
Instance details

Defined in Data.Semialign.Internal

Methods

irepeat :: ((i, j) -> a) -> Compose f g a Source #