Generics.Deriving.Functor

generic-deriving-1.11.1: Generic programming library for generalised deriving.

Safe Haskell | Safe
Language | Haskell2010

Generics.Deriving.Functor

Contents

- Generic Functor class
- Default method
- Internal Functor class

Synopsis

- class GFunctor f where
- gmapdefault :: (Generic1 f, GFunctor' (Rep1 f)) => (a -> b) -> f a -> f b
- class GFunctor' f where

# Generic Functor class

class GFunctor f where #

Methods

gmap :: (a -> b) -> f a -> f b #

gmap :: (Generic1 f, GFunctor' (Rep1 f)) => (a -> b) -> f a -> f b #

Instances

GFunctor [] # |
Methods gmap :: (a -> b) -> [a] -> [b] #
GFunctor Maybe # |
Methods gmap :: (a -> b) -> Maybe a -> Maybe b #
GFunctor IO # |
Methods gmap :: (a -> b) -> IO a -> IO b #
GFunctor Identity # |
Methods gmap :: (a -> b) -> Identity a -> Identity b #
GFunctor Min # |
Methods gmap :: (a -> b) -> Min a -> Min b #
GFunctor Max # |
Methods gmap :: (a -> b) -> Max a -> Max b #
GFunctor First # |
Methods gmap :: (a -> b) -> First a -> First b #
GFunctor Last # |
Methods gmap :: (a -> b) -> Last a -> Last b #
GFunctor WrappedMonoid # |
Methods gmap :: (a -> b) -> WrappedMonoid a -> WrappedMonoid b #
GFunctor Option # |
Methods gmap :: (a -> b) -> Option a -> Option b #
GFunctor NonEmpty # |
Methods gmap :: (a -> b) -> NonEmpty a -> NonEmpty b #
GFunctor Complex # |
Methods gmap :: (a -> b) -> Complex a -> Complex b #
GFunctor ZipList # |
Methods gmap :: (a -> b) -> ZipList a -> ZipList b #
GFunctor Dual # |
Methods gmap :: (a -> b) -> Dual a -> Dual b #
GFunctor Sum # |
Methods gmap :: (a -> b) -> Sum a -> Sum b #
GFunctor Product # |
Methods gmap :: (a -> b) -> Product a -> Product b #
GFunctor First # |
Methods gmap :: (a -> b) -> First a -> First b #
GFunctor Last # |
Methods gmap :: (a -> b) -> Last a -> Last b #
GFunctor ((->) r) # |
Methods gmap :: (a -> b) -> (r -> a) -> r -> b #
GFunctor (Either a) # |
Methods gmap :: (a -> b) -> Either a a -> Either a b #
GFunctor ((,) a) # |
Methods gmap :: (a -> b) -> (a, a) -> (a, b) #
GFunctor (Arg a) # |
Methods gmap :: (a -> b) -> Arg a a -> Arg a b #
GFunctor (Proxy *) # |
Methods gmap :: (a -> b) -> Proxy * a -> Proxy * b #
GFunctor (Const * m) # |
Methods gmap :: (a -> b) -> Const * m a -> Const * m b #
GFunctor f => GFunctor (Alt * f) # |
Methods gmap :: (a -> b) -> Alt * f a -> Alt * f b #
(GFunctor f, GFunctor g) => GFunctor (Sum * f g) # |
Methods gmap :: (a -> b) -> Sum * f g a -> Sum * f g b #
(GFunctor f, GFunctor g) => GFunctor (Product * f g) # |
Methods gmap :: (a -> b) -> Product * f g a -> Product * f g b #

# Default method

gmapdefault :: (Generic1 f, GFunctor' (Rep1 f)) => (a -> b) -> f a -> f b #

# Internal Functor class

class GFunctor' f where #

Minimal complete definition

gmap'

Methods

gmap' :: (a -> b) -> f a -> f b #

Instances

GFunctor' U1 # |
Methods gmap' :: (a -> b) -> U1 a -> U1 b #
GFunctor' Par1 # |
Methods gmap' :: (a -> b) -> Par1 a -> Par1 b #
GFunctor' UAddr # |
Methods gmap' :: (a -> b) -> UAddr a -> UAddr b #
GFunctor' UChar # |
Methods gmap' :: (a -> b) -> UChar a -> UChar b #
GFunctor' UDouble # |
Methods gmap' :: (a -> b) -> UDouble a -> UDouble b #
GFunctor' UFloat # |
Methods gmap' :: (a -> b) -> UFloat a -> UFloat b #
GFunctor' UInt # |
Methods gmap' :: (a -> b) -> UInt a -> UInt b #
GFunctor' UWord # |
Methods gmap' :: (a -> b) -> UWord a -> UWord b #
GFunctor f => GFunctor' (Rec1 f) # |
Methods gmap' :: (a -> b) -> Rec1 f a -> Rec1 f b #
GFunctor' (K1 i c) # |
Methods gmap' :: (a -> b) -> K1 i c a -> K1 i c b #
(GFunctor' f, GFunctor' g) => GFunctor' ((:+:) f g) # |
Methods gmap' :: (a -> b) -> (f :+: g) a -> (f :+: g) b #
(GFunctor' f, GFunctor' g) => GFunctor' ((:*:) f g) # |
Methods gmap' :: (a -> b) -> (f :*: g) a -> (f :*: g) b #
(GFunctor f, GFunctor' g) => GFunctor' ((:.:) f g) # |
Methods gmap' :: (a -> b) -> (f :.: g) a -> (f :.: g) b #
GFunctor' f => GFunctor' (M1 i c f) # |
Methods gmap' :: (a -> b) -> M1 i c f a -> M1 i c f b #