Copyright | (c) 2008 Universiteit Utrecht |
---|---|

License | BSD3 |

Maintainer | generics@haskell.org |

Stability | experimental |

Portability | non-portable |

Safe Haskell | Safe-Inferred |

Language | Haskell98 |

Summary: Monadic generic map.

# Functorial map function

class Functor f where

The `Functor`

class is used for types that can be mapped over.
Instances of `Functor`

should satisfy the following laws:

fmap id == id fmap (f . g) == fmap f . fmap g

The instances of `Functor`

for lists, `Maybe`

and `IO`

satisfy these laws.

fmap :: (a -> b) -> f a -> f b

Functor [] | |

Functor IO | |

Functor Q | |

Functor ZipList | |

Functor ReadPrec | |

Functor ReadP | |

Functor Maybe | |

Functor PprM | |

Functor U | |

Functor I | |

Functor ((->) r) | |

Functor (Either a) | |

Functor ((,) a) | |

Functor (Const m) | |

Monad m => Functor (WrappedMonad m) | |

Functor (K a) | |

Arrow a => Functor (WrappedArrow a b) | |

Functor f => Functor (S c f) | |

Functor f => Functor (C c f) | |

(Functor f, Functor g) => Functor ((:*:) f g) | |

(Functor f, Functor g) => Functor ((:+:) f g) |