Copyright | (c) Justin Le 2019 |
---|---|

License | BSD3 |

Maintainer | justin@jle.im |

Stability | experimental |

Portability | non-portable |

Safe Haskell | None |

Language | Haskell2010 |

# Documentation

data Ap1 :: (Type -> Type) -> Type -> Type where Source #

One or more `f`

s convolved with itself.

Essentially:

`Ap1`

f ~ f -- one f`:+:`

(f ``Day'`

f) -- two f's :+: (f `Day` f `Day` f) -- three f's :+: (f `Day` f `Day` f `Day` f) -- four f's :+: ... -- etc.

Useful if you want to promote an `f`

to a situation with "at least one
`f`

sequenced with itself".

Mostly useful for its `HFunctor`

and `Interpret`

instance, along with
its relationship with `Ap`

and `Day`

.

This is the free `Apply`

--- Basically a "non-empty" `Ap`

.

The construction here is based on `Ap`

, similar to now
`NonEmpty`

is built on list.

pattern DayAp1 :: Day f (Ap f) a -> Ap1 f a | An |

retractAp1 :: Apply f => Ap1 f ~> f Source #

Extract the `f`

out of the `Ap1`

.

`retractAp1`

.`liftAp1`

== id