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

Safe Haskell | None
Language | Haskell98

Generics.Deriving.Functor

Contents

- GFunctor class
- Default method

Synopsis

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

# GFunctor class

class GFunctor f where Source

Minimal complete definition

Nothing

Methods

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

Instances

GFunctor [] Source |
GFunctor IO Source |
GFunctor Identity Source |
GFunctor ZipList Source |
GFunctor First Source |
GFunctor Last Source |
GFunctor Maybe Source |
GFunctor ((->) r) Source |
GFunctor (Either a) Source |
GFunctor ((,) a) Source |
GFunctor (Const m) Source |
GFunctor f => GFunctor (Alt * f) Source |

# Default method

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