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 |
Instances
HBind Ap1 Source # | |
Inject Ap1 Source # | |
FreeOf Apply Ap1 Source # | |
HFunctor Ap1 Source # | |
Apply f => Interpret Ap1 (f :: Type -> Type) Source # | |
HTraversable Ap1 Source # | |
Defined in Data.Functor.Apply.Free | |
HTraversable1 Ap1 Source # | |
Defined in Data.Functor.Apply.Free | |
Functor (Ap1 f) Source # | |
Invariant (Ap1 f) Source # | Since: 0.3.0.0 |
Defined in Data.Functor.Apply.Free | |
Apply (Ap1 f) Source # | |
type FreeFunctorBy Ap1 Source # | |
Defined in Data.HFunctor.Final |
retractAp1 :: Apply f => Ap1 f ~> f Source #
Extract the f
out of the Ap1
.
retractAp1
.liftAp1
== id