free-applicative-t: Free Applicative Transformer

[ bsd3, control, library ] [ Propose Tags ] [ Report a vulnerability ]

The free applicative transformer ApT, in the same sense FreeT (from the package "free") is the free monad transformer.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.14.0.0 && <5), free (>=5.0.1 && <5.3) [details]
Tested with ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.5, ghc ==9.4.4
License BSD-3-Clause
Copyright 2022 Koji Miyazato
Author Koji Miyazato
Maintainer viercc@gmail.com
Revised Revision 1 made by viercc at 2023-12-22T06:34:26Z
Category Control
Home page https://github.com/viercc/functor-monad/tree/main/free-applicative-t
Uploaded by viercc at 2022-12-31T14:14:41Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 85 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-12-31 [all 1 reports]

Readme for free-applicative-t-0.1.0.0

[back to package description]

free-applicative-t

This package provides ApT, the "free" "applicative transformer" filling the empty corner in the table below.

Free -transformer
Monad Free FreeT
Applicative Ap ???

Why not Control.Applicative.Trans.Free?

There already is a type designated to be the free applicative transformer: ApT in the package free. Why do we do it again?

The applicative defined in Control.Applicative.Trans.Free is different to what this package provides. The difference is clear in how it is interpreted to another applicative:

-- "free" Control.Applicative.Trans.Free
runApT :: (Applicative h, Functor g) => (forall a. f a -> h a) -> (forall a. g (h a) -> h a) -> ApT f g b -> h b

-- "free-applicative-t" Control.Applicative.Trans.FreeAp
foldApT :: forall f g h b. Applicative h => (forall a. f a -> h a) -> (forall a. g a -> h a) -> ApT f g b -> h b

Although I (the author) believe this package provides the free applicative transformer under the most natural interpretation of "free" and "applicative transformer," the term "applicative transformer" has never been defined clearly and thus "free" thing of the "applicative transformer" hasn't been too. Because of this ambiguity, I want it to be another take on the Free Applicative Transformer, rather than the patch to the "free" package replacing the current Control.Applicative.Trans.Free.