
Data.Generics.Twins  Portability  nonportable  Stability  experimental  Maintainer  libraries@haskell.org 





Description 
"Scrap your boilerplate"  Generic programming in Haskell
See http://www.cs.vu.nl/boilerplate/. The present module
provides support for multiparameter traversal, which is also
demonstrated with generic operations like equality.


Synopsis 




The idiom of multiparameter traversal 

tfoldl :: (forall a b . Data a => c (a > b) > c a > c b) > (forall g . g > c g) > GenericQ (Generic c) > GenericQ (Generic c) 

Twin mapping combinators 

tmapT :: GenericQ GenericT > GenericQ GenericT 

tmapQl :: (r > r > r) > r > GenericQ (GenericQ r) > GenericQ (GenericQ r) 

tmapM :: Monad m => GenericQ (GenericM m) > GenericQ (GenericM m) 

Prime examples of twin traversal 

geq :: Data a => a > a > Bool 
Generic equality: an alternative to "deriving Eq" 

gzip :: (forall a b . (Data a, Data b) => a > b > Maybe b) > forall a b . (Data a, Data b) => a > b > Maybe b 
Generic zip controlled by a function with typespecific branches 

Produced by Haddock version 0.6 