chunked-data-0.3.0: Typeclasses for dealing with various chunked data representations

Safe HaskellNone
LanguageHaskell98

Data.ChunkedZip

Description

Various zipping and unzipping functions for chunked data structures.

Documentation

class Functor f => Zip f where Source #

Minimal complete definition

zipWith

Methods

zipWith :: (a -> b -> c) -> f a -> f b -> f c Source #

zip :: f a -> f b -> f (a, b) Source #

zap :: f (a -> b) -> f a -> f b Source #

unzip :: f (a, b) -> (f a, f b) Source #

Instances

Zip [] Source # 

Methods

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

zip :: [a] -> [b] -> [(a, b)] Source #

zap :: [a -> b] -> [a] -> [b] Source #

unzip :: [(a, b)] -> ([a], [b]) Source #

Zip NonEmpty Source # 

Methods

zipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #

zip :: NonEmpty a -> NonEmpty b -> NonEmpty (a, b) Source #

zap :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b Source #

unzip :: NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Source #

Zip Tree Source # 

Methods

zipWith :: (a -> b -> c) -> Tree a -> Tree b -> Tree c Source #

zip :: Tree a -> Tree b -> Tree (a, b) Source #

zap :: Tree (a -> b) -> Tree a -> Tree b Source #

unzip :: Tree (a, b) -> (Tree a, Tree b) Source #

Zip Seq Source # 

Methods

zipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c Source #

zip :: Seq a -> Seq b -> Seq (a, b) Source #

zap :: Seq (a -> b) -> Seq a -> Seq b Source #

unzip :: Seq (a, b) -> (Seq a, Seq b) Source #

Zip IntMap Source # 

Methods

zipWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c Source #

zip :: IntMap a -> IntMap b -> IntMap (a, b) Source #

zap :: IntMap (a -> b) -> IntMap a -> IntMap b Source #

unzip :: IntMap (a, b) -> (IntMap a, IntMap b) Source #

Zip Vector Source # 

Methods

zipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c Source #

zip :: Vector a -> Vector b -> Vector (a, b) Source #

zap :: Vector (a -> b) -> Vector a -> Vector b Source #

unzip :: Vector (a, b) -> (Vector a, Vector b) Source #

Zip ((->) a) Source # 

Methods

zipWith :: (a -> b -> c) -> (a -> a) -> (a -> b) -> a -> c Source #

zip :: (a -> a) -> (a -> b) -> a -> (a, b) Source #

zap :: (a -> a -> b) -> (a -> a) -> a -> b Source #

unzip :: (a -> (a, b)) -> (a -> a, a -> b) Source #

Zip m => Zip (IdentityT * m) Source # 

Methods

zipWith :: (a -> b -> c) -> IdentityT * m a -> IdentityT * m b -> IdentityT * m c Source #

zip :: IdentityT * m a -> IdentityT * m b -> IdentityT * m (a, b) Source #

zap :: IdentityT * m (a -> b) -> IdentityT * m a -> IdentityT * m b Source #

unzip :: IdentityT * m (a, b) -> (IdentityT * m a, IdentityT * m b) Source #

Zip m => Zip (ReaderT * e m) Source # 

Methods

zipWith :: (a -> b -> c) -> ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m c Source #

zip :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m (a, b) Source #

zap :: ReaderT * e m (a -> b) -> ReaderT * e m a -> ReaderT * e m b Source #

unzip :: ReaderT * e m (a, b) -> (ReaderT * e m a, ReaderT * e m b) Source #

(Zip f, Zip g) => Zip (Compose * * f g) Source # 

Methods

zipWith :: (a -> b -> c) -> Compose * * f g a -> Compose * * f g b -> Compose * * f g c Source #

zip :: Compose * * f g a -> Compose * * f g b -> Compose * * f g (a, b) Source #

zap :: Compose * * f g (a -> b) -> Compose * * f g a -> Compose * * f g b Source #

unzip :: Compose * * f g (a, b) -> (Compose * * f g a, Compose * * f g b) Source #

class Functor f => Zip3 f where Source #

Minimal complete definition

zipWith3, unzip3

Methods

zipWith3 :: (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

zip3 :: f a -> f b -> f c -> f (a, b, c) Source #

zap3 :: f (a -> b -> c) -> f a -> f b -> f c Source #

unzip3 :: f (a, b, c) -> (f a, f b, f c) Source #

Instances

Zip3 [] Source # 

Methods

zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] Source #

zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] Source #

zap3 :: [a -> b -> c] -> [a] -> [b] -> [c] Source #

unzip3 :: [(a, b, c)] -> ([a], [b], [c]) Source #

Zip3 Seq Source # 

Methods

zipWith3 :: (a -> b -> c -> d) -> Seq a -> Seq b -> Seq c -> Seq d Source #

zip3 :: Seq a -> Seq b -> Seq c -> Seq (a, b, c) Source #

zap3 :: Seq (a -> b -> c) -> Seq a -> Seq b -> Seq c Source #

unzip3 :: Seq (a, b, c) -> (Seq a, Seq b, Seq c) Source #

Zip3 Vector Source # 

Methods

zipWith3 :: (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d Source #

zip3 :: Vector a -> Vector b -> Vector c -> Vector (a, b, c) Source #

zap3 :: Vector (a -> b -> c) -> Vector a -> Vector b -> Vector c Source #

unzip3 :: Vector (a, b, c) -> (Vector a, Vector b, Vector c) Source #

class Functor f => Zip4 f where Source #

Minimal complete definition

zipWith4, unzip4

Methods

zipWith4 :: (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source #

zip4 :: f a -> f b -> f c -> f d -> f (a, b, c, d) Source #

zap4 :: f (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

unzip4 :: f (a, b, c, d) -> (f a, f b, f c, f d) Source #

Instances

Zip4 [] Source # 

Methods

zipWith4 :: (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] Source #

zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] Source #

zap4 :: [a -> b -> c -> d] -> [a] -> [b] -> [c] -> [d] Source #

unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d]) Source #

Zip4 Seq Source # 

Methods

zipWith4 :: (a -> b -> c -> d -> e) -> Seq a -> Seq b -> Seq c -> Seq d -> Seq e Source #

zip4 :: Seq a -> Seq b -> Seq c -> Seq d -> Seq (a, b, c, d) Source #

zap4 :: Seq (a -> b -> c -> d) -> Seq a -> Seq b -> Seq c -> Seq d Source #

unzip4 :: Seq (a, b, c, d) -> (Seq a, Seq b, Seq c, Seq d) Source #

Zip4 Vector Source # 

Methods

zipWith4 :: (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e Source #

zip4 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector (a, b, c, d) Source #

zap4 :: Vector (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d Source #

unzip4 :: Vector (a, b, c, d) -> (Vector a, Vector b, Vector c, Vector d) Source #

class Functor f => Zip5 f where Source #

Minimal complete definition

zipWith5, unzip5

Methods

zipWith5 :: (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g Source #

zip5 :: f a -> f b -> f c -> f d -> f e -> f (a, b, c, d, e) Source #

zap5 :: f (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source #

unzip5 :: f (a, b, c, d, e) -> (f a, f b, f c, f d, f e) Source #

Instances

Zip5 [] Source # 

Methods

zipWith5 :: (a -> b -> c -> d -> e -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] Source #

zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] Source #

zap5 :: [a -> b -> c -> d -> e] -> [a] -> [b] -> [c] -> [d] -> [e] Source #

unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) Source #

Zip5 Vector Source # 

Methods

zipWith5 :: (a -> b -> c -> d -> e -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g Source #

zip5 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector (a, b, c, d, e) Source #

zap5 :: Vector (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e Source #

unzip5 :: Vector (a, b, c, d, e) -> (Vector a, Vector b, Vector c, Vector d, Vector e) Source #

class Functor f => Zip6 f where Source #

Minimal complete definition

zipWith6, unzip6

Methods

zipWith6 :: (a -> b -> c -> d -> e -> g -> h) -> f a -> f b -> f c -> f d -> f e -> f g -> f h Source #

zip6 :: f a -> f b -> f c -> f d -> f e -> f g -> f (a, b, c, d, e, g) Source #

zap6 :: f (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g Source #

unzip6 :: f (a, b, c, d, e, g) -> (f a, f b, f c, f d, f e, f g) Source #

Instances

Zip6 [] Source # 

Methods

zipWith6 :: (a -> b -> c -> d -> e -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [h] Source #

zip6 :: [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [(a, b, c, d, e, g)] Source #

zap6 :: [a -> b -> c -> d -> e -> g] -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] Source #

unzip6 :: [(a, b, c, d, e, g)] -> ([a], [b], [c], [d], [e], [g]) Source #

Zip6 Vector Source # 

Methods

zipWith6 :: (a -> b -> c -> d -> e -> g -> h) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g -> Vector h Source #

zip6 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g -> Vector (a, b, c, d, e, g) Source #

zap6 :: Vector (a -> b -> c -> d -> e -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g Source #

unzip6 :: Vector (a, b, c, d, e, g) -> (Vector a, Vector b, Vector c, Vector d, Vector e, Vector g) Source #

class Functor f => Zip7 f where Source #

Minimal complete definition

zipWith7, unzip7

Methods

zipWith7 :: (a -> b -> c -> d -> e -> g -> h -> i) -> f a -> f b -> f c -> f d -> f e -> f g -> f h -> f i Source #

zip7 :: f a -> f b -> f c -> f d -> f e -> f g -> f h -> f (a, b, c, d, e, g, h) Source #

zap7 :: f (a -> b -> c -> d -> e -> g -> h) -> f a -> f b -> f c -> f d -> f e -> f g -> f h Source #

unzip7 :: f (a, b, c, d, e, g, h) -> (f a, f b, f c, f d, f e, f g, f h) Source #

Instances

Zip7 [] Source # 

Methods

zipWith7 :: (a -> b -> c -> d -> e -> g -> h -> i) -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [h] -> [i] Source #

zip7 :: [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [h] -> [(a, b, c, d, e, g, h)] Source #

zap7 :: [a -> b -> c -> d -> e -> g -> h] -> [a] -> [b] -> [c] -> [d] -> [e] -> [g] -> [h] Source #

unzip7 :: [(a, b, c, d, e, g, h)] -> ([a], [b], [c], [d], [e], [g], [h]) Source #