Generics.Deriving.Functor

generic-deriving-1.14.6: 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 :: Type -> Type) where
  - gmap :: (a -> b) -> f a -> f b
- gmapdefault :: (Generic1 f, GFunctor' (Rep1 f)) => (a -> b) -> f a -> f b
- class GFunctor' (f :: Type -> Type) where
  - gmap' :: (a -> b) -> f a -> f b

# Generic Functor class

class GFunctor (f :: Type -> Type) where #

Minimal complete definition

Nothing

Methods

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

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

#### Instances

Instances details

GFunctor Complex # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Complex a -> Complex b #
GFunctor First # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> First a -> First b #
GFunctor Last # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Last a -> Last b #
GFunctor Max # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Max a -> Max b #
GFunctor Min # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Min a -> Min b #
GFunctor WrappedMonoid # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> WrappedMonoid a -> WrappedMonoid b #
GFunctor NonEmpty # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> NonEmpty a -> NonEmpty b #
GFunctor Identity # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Identity a -> Identity b #
GFunctor First # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> First a -> First b #
GFunctor Last # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Last a -> Last b #
GFunctor Down # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Down a -> Down b #
GFunctor Dual # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Dual a -> Dual b #
GFunctor Product # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Product a -> Product b #
GFunctor Sum # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Sum a -> Sum b #
GFunctor ZipList # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> ZipList a -> ZipList b #
GFunctor IO # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> IO a -> IO b #
GFunctor Maybe # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Maybe a -> Maybe b #
GFunctor [] # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> [a] -> [b] #
GFunctor (Arg a) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a0 -> b) -> Arg a a0 -> Arg a b #
(Generic1 f, GFunctor' (Rep1 f)) => GFunctor (Default1 f) # |
Instance details Defined in Generics.Deriving.Default Methods gmap :: (a -> b) -> Default1 f a -> Default1 f b #
GFunctor (Either a) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a0 -> b) -> Either a a0 -> Either a b #
GFunctor (Proxy :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Proxy a -> Proxy b #
GFunctor ((,) a) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a0 -> b) -> (a, a0) -> (a, b) #
GFunctor (Const m :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Const m a -> Const m b #
GFunctor f => GFunctor (Alt f) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Alt f a -> Alt f b #
(GFunctor f, GFunctor g) => GFunctor (Product f g) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Product f g a -> Product f g b #
(GFunctor f, GFunctor g) => GFunctor (Sum f g) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> Sum f g a -> Sum f g b #
GFunctor ((->) r) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap :: (a -> b) -> (r -> a) -> r -> b #

# Default method

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

# Internal Functor class

class GFunctor' (f :: Type -> Type) where #

Methods

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

#### Instances

Instances details

GFunctor' Par1 # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> Par1 a -> Par1 b #
GFunctor' (U1 :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> U1 a -> U1 b #
GFunctor' (UAddr :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> UAddr a -> UAddr b #
GFunctor' (UChar :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> UChar a -> UChar b #
GFunctor' (UDouble :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> UDouble a -> UDouble b #
GFunctor' (UFloat :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> UFloat a -> UFloat b #
GFunctor' (UInt :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> UInt a -> UInt b #
GFunctor' (UWord :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> UWord a -> UWord b #
GFunctor' (V1 :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> V1 a -> V1 b #
GFunctor f => GFunctor' (Rec1 f) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> Rec1 f a -> Rec1 f b #
(GFunctor' f, GFunctor' g) => GFunctor' (f :*: g) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> (f :*: g) a -> (f :*: g) b #
(GFunctor' f, GFunctor' g) => GFunctor' (f :+: g) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> (f :+: g) a -> (f :+: g) b #
GFunctor' (K1 i c :: Type -> Type) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> K1 i c a -> K1 i c b #
(GFunctor f, GFunctor' g) => GFunctor' (f :.: g) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> (f :.: g) a -> (f :.: g) b #
GFunctor' f => GFunctor' (M1 i c f) # |
Instance details Defined in Generics.Deriving.Functor Methods gmap' :: (a -> b) -> M1 i c f a -> M1 i c f b #