packages feed

elision 0.1.1.0 → 0.1.2.0

raw patch · 2 files changed

+24/−8 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Arrow.Elision: after :: (a -> f b) -> Elision f a b
+ Control.Arrow.Elision: before :: (a -> b) -> Elision f (f a) b

Files

elision.cabal view
@@ -1,5 +1,5 @@ name:                elision-version:             0.1.1.0+version:             0.1.2.0 synopsis:            Arrows with holes. description:         A framework for describing holes in transformations                      and impure computations purely.
src/Control/Arrow/Elision.hs view
@@ -14,13 +14,17 @@          Elision        , Elision' -         -- * Elision manipulation functions-       , apply+         -- * Constructors+       , after        , basic-       , complete-       , complete'+       , before        , elide        , terminal++         -- * Manipulation+       , apply+       , complete+       , complete'        , unelide        , unelide' @@ -55,11 +59,11 @@ import Control.Category    (Category (..), (<<<), (>>>)) import Control.Monad       (Functor (..), Monad (..), (<=<), (=<<)) import Data.Either         (Either (..))-import Data.Function       (const, ($))+import Data.Function       (const, flip, ($)) import Data.Profunctor     (Profunctor (..))  infixr 2 //-infixr 1 />>, <</ +infixr 4 />>, <</  -------------------------------------------------------------------------------- -- | A lens-esque type that can be used to "skip" part of a function.@@ -166,10 +170,22 @@   dimap f g basic  --------------------------------------------------------------------------------+-- | Create an elision chained to the end of the provided function.+after :: (a -> f b) -> Elision f a b+after =+  flip elide id++--------------------------------------------------------------------------------+-- | Create an elision chained to the beginning of the provided function.+before :: (a -> b) -> Elision f (f a) b+before =+  elide id++-------------------------------------------------------------------------------- -- | Create an elision with the input fully applied. terminal :: f a -> Elision f () a terminal x =-  lmap (const x) basic+  after (const x)  -------------------------------------------------------------------------------- -- | Either @f a@ or @g a@.