bifunctors 0.1.3.1 → 0.1.3.3
raw patch · 3 files changed
+9/−13 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- .travis.yml +1/−0
- Data/Bifunctor/Apply.hs +5/−12
- bifunctors.cabal +3/−1
+ .travis.yml view
@@ -0,0 +1,1 @@+language: haskell
Data/Bifunctor/Apply.hs view
@@ -9,9 +9,9 @@ -- Portability : portable -- -----------------------------------------------------------------------------module Data.Bifunctor.Apply ( +module Data.Bifunctor.Apply ( -- * Functors- -- * Applyable bifunctors+ -- * BiAppliable bifunctors Biapply(..) , (<<$>>) , (<<..>>)@@ -20,7 +20,6 @@ , module Data.Bifunctor ) where --- import _everything_ import Data.Bifunctor infixl 4 <<$>>, <<.>>, <<., .>>, <<..>>@@ -28,12 +27,6 @@ (<<$>>) :: (a -> b) -> a -> b (<<$>>) = id --- | A strong lax semi-monoidal endofunctor. --- This is equivalent to an 'Applicative' without 'pure'.--- --- Laws: ------ > associative composition: (.) <$> u <.> v <.> w = u <.> (v <.> w) class Bifunctor p => Biapply p where (<<.>>) :: p (a -> b) (c -> d) -> p a c -> p b d @@ -46,14 +39,14 @@ a <<. b = bimap const const <<$>> a <<.>> b (<<..>>) :: Biapply p => p a c -> p (a -> b) (c -> d) -> p b d-(<<..>>) = bilift2 (flip id) (flip id) +(<<..>>) = bilift2 (flip id) (flip id) --- | Lift a binary function into a comonad with zipping+-- | Lift binary functions bilift2 :: Biapply w => (a -> b -> c) -> (d -> e -> f) -> w a d -> w b e -> w c f bilift2 f g a b = bimap f g <<$>> a <<.>> b {-# INLINE bilift2 #-} --- | Lift a ternary function into a comonad with zipping+-- | Lift ternary functions bilift3 :: Biapply w => (a -> b -> c -> d) -> (e -> f -> g -> h) -> w a e -> w b f -> w c g -> w d h bilift3 f g a b c = bimap f g <<$>> a <<.>> b <<.>> c {-# INLINE bilift3 #-}
bifunctors.cabal view
@@ -1,6 +1,6 @@ name: bifunctors category: Data, Functors-version: 0.1.3.1+version: 0.1.3.3 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE@@ -8,10 +8,12 @@ maintainer: Edward A. Kmett <ekmett@gmail.com> stability: provisional homepage: http://github.com/ekmett/bifunctors/+bug-reports: http://github.com/ekmett/bifunctors/issues copyright: Copyright (C) 2008-2011 Edward A. Kmett synopsis: Haskell 98 bifunctors description: Haskell 98 bifunctors build-type: Simple+extra-source-files: .travis.yml source-repository head type: git