semialign-optics-1.1: SemialignWithIndex, i.e. izipWith and ialignWith

Safe HaskellTrustworthy
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.

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
SemialignWithIndex Int [] Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

SemialignWithIndex Int ZipList Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

SemialignWithIndex Int IntMap Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

SemialignWithIndex Int Seq Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

SemialignWithIndex Int Vector Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

SemialignWithIndex () Maybe Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

SemialignWithIndex () Identity Source # 
Instance details

Defined in Data.Semialign.Indexed

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.Indexed

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.Indexed

Methods

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

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

Defined in Data.Semialign.Indexed

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.Indexed

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

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
ZipWithIndex Int [] Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

ZipWithIndex Int ZipList Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

ZipWithIndex Int IntMap Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

ZipWithIndex Int Seq Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

ZipWithIndex Int Vector Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

ZipWithIndex () Maybe Source # 
Instance details

Defined in Data.Semialign.Indexed

Methods

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

ZipWithIndex () Identity Source # 
Instance details

Defined in Data.Semialign.Indexed

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.Indexed

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.Indexed

Methods

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

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

Defined in Data.Semialign.Indexed

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.Indexed

Methods

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