functor-combinators v0.3.0.0 Release Notes
-
August 5, 2020
🚀 https://github.com/mstksg/functor-combinators/releases/tag/v0.3.0.0
- Data.HBifunctor.Associative, Data.HBifunctor.Tensor: Support for
Contravariant
andInvariant
functor combinators. Main change to the infrastructure: add aFunctorBy
associated constraint toAssociative
to signal what "sort of functor" the tensor supports: it should either beUnconstrained
,Functor
,Contravariant
, orInvariant
. - Data.Functor.Contravariant.Divise, Data.Functor.Contravariant.Decide, and Data.Functor.Contravariant.Conclude: Temporarily add in the semigroupoidal contravariant typeclasses. These should only be needed until they get merged into semigroupoids.
- Data.Functor.Contravariant.Divisible: Add free structures for contravariant typeclass hierarchy.
Added in some new day convolutions:
- Data.Functor.Contravariant.Night:
Night
, a contravariant day convolution usingEither
, which is the tensor that generatesConclude
(andDecidable
kinda). - Data.Functor.Invariant.Day:
Day
, an invariant day convolution using tuples. - Data.Functor.Invariant.Night:
Night
, an invariant day convolution using either.
For the invariant day convolutions, we could write free monoids on them (like
Ap
/Div
/Dec
). But instead we just outsource our free structures toChain
, providing useful pattern synonyms and folding functions to pretend like we had an actual free structure.- Data.Functor.Contravariant.Night:
Data.Functor.Combinator: Useful functions in for working with divisible and decidable contravariant functors:
divideN
,diviseN
,concludeN
,decideN
,divideNRec
, anddiviseNRec
.Contravariant
andInvariant
instances for many types.Data.HFunctor.Final:
FreeOf
adjusted to allow for contravariant free types.Data.Functor.Combinator.Unsafe: Add
unsafeDivise
andunsafeConclude
, to mirror the situation withunsafeApply
andunsafePlus
.
- Data.HBifunctor.Associative, Data.HBifunctor.Tensor: Support for