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

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

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
Dependencies base (>=4.9 && <5) [details]
License MIT
Copyright 2018 Donnacha Oisín Kidney
Author Donnacha Oisín Kidney
Maintainer mail@doisinkidney.com
Revised Revision 1 made by oisdk at 2018-12-31T19:00:57Z
Category Control
Home page https://github.com/oisdk/arity-generic-liftA#readme
Bug tracker https://github.com/oisdk/arity-generic-liftA/issues
Source repo head: git clone https://github.com/oisdk/arity-generic-liftA
Uploaded by oisdk at 2018-12-31T17:03:04Z
Distributions NixOS:0.1.0.0
Downloads 869 total (5 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-0.1.0.0

[back to package description]

arity-generic-liftA

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.