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 #
Indexed version of Semialign
.
Since: 1.2
Minimal complete definition
Nothing
Methods
ialignWith :: (i -> These a b -> c) -> f a -> f b -> f c #
Analogous to alignWith
, but also provides an index.
Instances
class (SemialignWithIndex i f, Zip f) => ZipWithIndex i (f :: Type -> Type) | f -> i where #
Indexed version of Zip
.
Since: 1.2
Minimal complete definition
Nothing
Methods
izipWith :: (i -> a -> b -> c) -> f a -> f b -> f c #
Analogous to zipWith
, but also provides an index.
Instances
ZipWithIndex () Identity # | |
ZipWithIndex () Maybe # | |
ZipWithIndex Int IntMap # | |
ZipWithIndex Int Seq # | |
ZipWithIndex Int NonEmpty # | |
ZipWithIndex Int ZipList # | |
ZipWithIndex Int Vector # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex Int [] # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex Void (Proxy :: Type -> Type) # | |
Ord k => ZipWithIndex k (Map k) # | |
(Eq k, Hashable k) => ZipWithIndex k (HashMap k) # | |
ZipWithIndex () (Tagged b) # | |
ZipWithIndex e ((->) e) # | |
Defined in Data.Semialign.Internal | |
(ZipWithIndex i f, ZipWithIndex j g) => ZipWithIndex (Either i j) (Product f g) # | |
(ZipWithIndex i f, ZipWithIndex j g) => ZipWithIndex (i, j) (Compose f g) # | |
class (ZipWithIndex i f, Repeat f) => RepeatWithIndex i (f :: Type -> Type) | f -> i where #
Indexed version of Repeat
.
Since: 1.2
Minimal complete definition
Nothing
Methods
Analogous to repeat
, but also provides an index.
This should be the same as tabulate
for representable functors.
Instances
RepeatWithIndex () Identity # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex () Maybe # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex Int NonEmpty # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex Int ZipList # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex Int [] # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex Void (Proxy :: Type -> Type) # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex () (Tagged b) # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex e ((->) e) # | |
Defined in Data.Semialign.Internal | |
(RepeatWithIndex i f, RepeatWithIndex j g) => RepeatWithIndex (Either i j) (Product f g) # | |
Defined in Data.Semialign.Internal | |
(RepeatWithIndex i f, RepeatWithIndex j g) => RepeatWithIndex (i, j) (Compose f g) # | |
Defined in Data.Semialign.Internal |