free-applicative-t: Free Applicative Transformer

[ bsd3, control, library ] [ Propose Tags ]

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

[Skip to Readme]


[Index] [Quick Jump]


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


  • No Candidates
Versions [RSS]
Change log
Dependencies base (>= && <5), free (>=5.0.1 && <5.3) [details]
License BSD-3-Clause
Copyright 2022 Koji Miyazato
Author Koji Miyazato
Revised Revision 1 made by viercc at 2023-12-22T06:34:26Z
Category Control
Home page
Uploaded by viercc at 2022-12-31T14:14:41Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 65 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-

[back to package description]


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.