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 | 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 #
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
SemialignWithIndex () Identity # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (() -> These a b -> c) -> Identity a -> Identity b -> Identity c # | |
SemialignWithIndex () Maybe # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (() -> These a b -> c) -> Maybe a -> Maybe b -> Maybe c # | |
SemialignWithIndex Int ZipList # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> ZipList a -> ZipList b -> ZipList c # | |
SemialignWithIndex Int NonEmpty # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c # | |
SemialignWithIndex Int IntMap # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> IntMap a -> IntMap b -> IntMap c # | |
SemialignWithIndex Int Seq # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> Seq a -> Seq b -> Seq c # | |
SemialignWithIndex Int Vector # | |
Defined in Data.Semialign.Internal | |
SemialignWithIndex Int List # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Int -> These a b -> c) -> [a] -> [b] -> [c] # | |
SemialignWithIndex Void (Proxy :: Type -> Type) # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (Void -> These a b -> c) -> Proxy a -> Proxy b -> Proxy c # | |
Ord k => SemialignWithIndex k (Map k) # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (k -> These a b -> c) -> Map k a -> Map k b -> Map k c # | |
(Eq k, Hashable k) => SemialignWithIndex k (HashMap k) # | |
Defined in Data.Semialign.Internal | |
SemialignWithIndex () (Tagged b) # | |
Defined in Data.Semialign.Internal | |
SemialignWithIndex e ((->) e) # | |
Defined in Data.Semialign.Internal Methods ialignWith :: (e -> These a b -> c) -> (e -> a) -> (e -> b) -> e -> c # | |
(SemialignWithIndex i f, SemialignWithIndex j g) => SemialignWithIndex (Either i j) (Product f g) # | |
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 # | |
(SemialignWithIndex i f, SemialignWithIndex j g) => SemialignWithIndex (i, j) (Compose f g) # | |
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 # |
class (SemialignWithIndex i f, Zip f) => ZipWithIndex i f | 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 # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex () Maybe # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex Int ZipList # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex Int NonEmpty # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex Int IntMap # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex Int Seq # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex Int Vector # | |
ZipWithIndex Int List # | |
Defined in Data.Semialign.Internal | |
ZipWithIndex Void (Proxy :: Type -> Type) # | |
Defined in Data.Semialign.Internal | |
Ord k => ZipWithIndex k (Map k) # | |
Defined in Data.Semialign.Internal | |
(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) # | |
Defined in Data.Semialign.Internal | |
(ZipWithIndex i f, ZipWithIndex j g) => ZipWithIndex (i, j) (Compose f g) # | |
Defined in Data.Semialign.Internal |
class (ZipWithIndex i f, Repeat f) => RepeatWithIndex i f | 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 ZipList # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex Int NonEmpty # | |
Defined in Data.Semialign.Internal | |
RepeatWithIndex Int List # | |
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 |