name: hydraulics version: 1.0.0 synopsis: Lift any pure function over any Applicative stack. description: This package contains a family of functions based on familiar 'Applicative', 'Functor', 'Traversable', and 'Foldable' methods but with the ability to operate on stacks of arbitrary depth. . For example, 'liftAll' is like the 'liftA2' and 'liftA3' functions except that it can lift a function through multiple layers of @Applicative@s instead of just one. Additionally, it can lift a function of arbitrary arity, not just a 2 argument function like with 'liftA2'. . The term \"stack\" is used in this library's documentation to refer to something like . > Maybe [Either Bool [Int]] . where @Int@ is embedded in a nesting of types that all share some common interface, such as @Applicative@, @Traversable@, or @Foldable@. . It's necessary to turn on so that you can supply a type argument that tells the compiler about the stack you are operating on. You specify the stack by giving it's type with @()@ as the embedded value. The @()@ should be at the level in the stack at which your target value is embedded. Here is an example GHCi session: . >>> :set -XTypeApplications >>> liftAll @[Maybe [()]] (+) [Just [3 :: Int]] [Just [6, 7]] [Just [9,10]] >>> data Foo = Foo Int String Double deriving Show >>> liftAll @[[()]] Foo [[2]] [["string"]] [[5]] [[Foo 2 "string" 5.0]] >>> fmapAll @[Maybe ()] length [Just "string"] [Just 6] >>> traverseAll @(Either String [()]) print (Right [1,2,3]) 1 2 3 Right [(),(),()] . (Additional examples are in the haddocks.) homepage: https://github.com/aaronallen8455/hydraulics#readme license: BSD3 license-file: LICENSE author: Aaron Allen maintainer: aaronallen8455@gmail.com copyright: 2020 Aaron Allen category: Control, Utils build-type: Simple extra-source-files: README.md cabal-version: >=1.10 library hs-source-dirs: src exposed-modules: Control.Lift build-depends: base >= 4.7 && < 5 default-language: Haskell2010 source-repository head type: git location: https://github.com/aaronallen8455/hydraulics