regular-0.3.4.4: Generic programming library for regular datatypes.

Copyright(c) 2008 Universiteit Utrecht
LicenseBSD3
Maintainergenerics@haskell.org
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell98

Generics.Regular.Functions.Zip

Contents

Description

Summary: Generic zip.

Synopsis

Zip functions

class Zip f where Source

The Zip class defines a monadic zip on functorial values.

Methods

fzipM :: Monad m => (a -> b -> m c) -> f a -> f b -> m (f c) Source

Instances

Zip U 
Zip I 
Eq a => Zip (K a) 
Zip f => Zip (S s f) 
Zip f => Zip (C c f) 
(Zip f, Zip g) => Zip ((:*:) f g) 
(Zip f, Zip g) => Zip ((:+:) f g) 

fzip :: (Zip f, Monad m) => (a -> b -> c) -> f a -> f b -> m (f c) Source

Functorial zip with a non-monadic function, resulting in a monadic value.

fzip' :: Zip f => (a -> b -> c) -> f a -> f b -> f c Source

Partial functorial zip with a non-monadic function.