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