@hackage arity-generic-liftA0.1.0.0

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

  • Installation

  • Dependencies (1)

  • Dependents (0)

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.