| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Semialign.Indexed
Description
Zipping and aligning of indexed functors.
Synopsis
- class (FunctorWithIndex i f, Semialign f) => SemialignWithIndex i (f :: Type -> Type) | f -> i where
- ialignWith :: (i -> These a b -> c) -> f a -> f b -> f c
- class (SemialignWithIndex i f, Zip f) => ZipWithIndex i (f :: Type -> Type) | f -> i where
- izipWith :: (i -> a -> b -> c) -> f a -> f b -> f c
- class (ZipWithIndex i f, Repeat f) => RepeatWithIndex i (f :: Type -> Type) | f -> i where
- irepeat :: (i -> a) -> f a
Documentation
class (FunctorWithIndex i f, Semialign f) => SemialignWithIndex i (f :: Type -> Type) | 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
| SemialignWithIndex () Identity Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (() -> These a b -> c) -> Identity a -> Identity b -> Identity c Source # | |
| SemialignWithIndex () Maybe Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (() -> These a b -> c) -> Maybe a -> Maybe b -> Maybe c Source # | |
| SemialignWithIndex Int IntMap Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> IntMap a -> IntMap b -> IntMap c Source # | |
| SemialignWithIndex Int Seq Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> Seq a -> Seq b -> Seq c Source # | |
| SemialignWithIndex Int NonEmpty Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source # | |
| SemialignWithIndex Int ZipList Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> ZipList a -> ZipList b -> ZipList c Source # | |
| SemialignWithIndex Int Vector Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> Vector a -> Vector b -> Vector c Source # | |
| SemialignWithIndex Int [] Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> [a] -> [b] -> [c] Source # | |
| SemialignWithIndex Void (Proxy :: Type -> Type) Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Void -> These a b -> c) -> Proxy a -> Proxy b -> Proxy c Source # | |
| Ord k => SemialignWithIndex k (Map k) Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (k -> These a b -> c) -> Map k a -> Map k b -> Map k c Source # | |
| (Eq k, Hashable k) => SemialignWithIndex k (HashMap k) Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (k -> These a b -> c) -> HashMap k a -> HashMap k b -> HashMap k c Source # | |
| SemialignWithIndex () (Tagged b) Source # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (() -> These a b0 -> c) -> Tagged b a -> Tagged b b0 -> Tagged b c Source # | |
| SemialignWithIndex e ((->) e) Source # | |
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 # | |
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 # | |
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 :: Type -> Type) | 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
class (ZipWithIndex i f, Repeat f) => RepeatWithIndex i (f :: Type -> Type) | 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
| RepeatWithIndex () Identity Source # | |
Defined in Data.Semialign.Internal | |
| RepeatWithIndex () Maybe Source # | |
Defined in Data.Semialign.Internal | |
| RepeatWithIndex Int NonEmpty Source # | |
Defined in Data.Semialign.Internal | |
| RepeatWithIndex Int ZipList Source # | |
Defined in Data.Semialign.Internal | |
| RepeatWithIndex Int [] Source # | |
Defined in Data.Semialign.Internal | |
| RepeatWithIndex Void (Proxy :: Type -> Type) Source # | |
Defined in Data.Semialign.Internal | |
| RepeatWithIndex () (Tagged b) Source # | |
Defined in Data.Semialign.Internal | |
| RepeatWithIndex e ((->) e) Source # | |
Defined in Data.Semialign.Internal | |
| (RepeatWithIndex i f, RepeatWithIndex j g) => RepeatWithIndex (Either i j) (Product f g) Source # | |
Defined in Data.Semialign.Internal | |
| (RepeatWithIndex i f, RepeatWithIndex j g) => RepeatWithIndex (i, j) (Compose f g) Source # | |
Defined in Data.Semialign.Internal | |