English

Free Applicative Functors

Programming Languages 2014-06-10 v3 Category Theory

Abstract

Applicative functors are a generalisation of monads. Both allow the expression of effectful computations into an otherwise pure language, like Haskell. Applicative functors are to be preferred to monads when the structure of a computation is fixed a priori. That makes it possible to perform certain kinds of static analysis on applicative values. We define a notion of free applicative functor, prove that it satisfies the appropriate laws, and that the construction is left adjoint to a suitable forgetful functor. We show how free applicative functors can be used to implement embedded DSLs which can be statically analysed.

Keywords

Cite

@article{arxiv.1403.0749,
  title  = {Free Applicative Functors},
  author = {Paolo Capriotti and Ambrus Kaposi},
  journal= {arXiv preprint arXiv:1403.0749},
  year   = {2014}
}

Comments

In Proceedings MSFP 2014, arXiv:1406.1534

R2 v1 2026-06-22T03:19:47.123Z