arity-generic-liftA: Provides an arity-generic version of the liftA2, liftA3... liftAn functions.

[ control, library, mit ] [ Propose Tags ]


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]
Dependencies base (>=4.9 && <5) [details]
License MIT
Copyright 2018 Donnacha Oisín Kidney
Author Donnacha Oisín Kidney
Revised Revision 1 made by oisdk at 2018-12-31T19:00:57Z
Category Control
Home page
Bug tracker
Source repo head: git clone
Uploaded by oisdk at 2018-12-31T17:03:04Z
Distributions NixOS:
Downloads 825 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-12-31 [all 1 reports]

Readme for arity-generic-liftA-

[back to package description]


There's a family of functions in Control.Applicative which follow the pattern liftA2, liftA3, etc. Using some tricks from Richard Eisenberg's thesis we can write them all at once. This package does exactly that, providing a function (lift) which is an arity-generic version of the liftAn.

>>> lift (\x y z -> x ++ y ++ z) (Just "a") (Just "b") (Just "c")
Just "abc"

Eisenberg, Richard A. “Dependent Types in Haskell: Theory and Practice.” University of Pennsylvania, 2016.