first-class-families-0.8.0.0: First class type families

Safe Haskell | Safe
Language | Haskell2010

Fcf.Class.Monoid.Types

Contents

- Endo

Description

Carriers of useful monoid instances.

Synopsis

- newtype Endo a = Endo (a -> Exp a)
- type family UnEndo (e :: Endo a) :: a -> Exp a where ...

# Endo

newtype Endo a Source #

Endofunctions.

### Details

Expand

This is is used in the default implementation of `Foldr` in terms of `FoldMap`.

Constructors

Endo (a -> Exp a) |

#### Instances

Instances details

type MEmpty Source # |
Instance details Defined in Fcf.Class.Monoid.Types type MEmpty = 'Endo (Pure :: a -> a -> Type)
type ('Endo f :: Endo a) <> ('Endo g :: Endo a) Source # |
Instance details Defined in Fcf.Class.Monoid.Types type ('Endo f :: Endo a) <> ('Endo g :: Endo a) = 'Endo (f <=< g)

type family UnEndo (e :: Endo a) :: a -> Exp a where ... Source #

Inverse of the `Endo` constructor.

Equations

UnEndo ('Endo f) = f |