@hackage / arity-generic-liftA

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

Latest0.1.0.0

About

Metadata

  • Last updated , by oisdk
  • License MIT
  • Maintained by: mail@doisinkidney.com

  • Lottery factor: 0

Links

Installation

Readme

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.