pipes-transduce 0.3.3.0 → 0.3.4.0
raw patch · 5 files changed
+32/−8 lines, 5 filesdep −lens-family-core
Dependencies removed: lens-family-core
Files
- CHANGELOG +6/−0
- pipes-transduce.cabal +2/−3
- src/Pipes/Transduce.hs +15/−2
- src/Pipes/Transduce/ByteString.hs +1/−1
- src/Pipes/Transduce/Text.hs +8/−2
CHANGELOG view
@@ -1,3 +1,9 @@+0.3.4.0+=======++- Removed lens-family dependency.+- Solved BOM problem.+ 0.3.3.0 =======
pipes-transduce.cabal view
@@ -1,5 +1,5 @@ Name: pipes-transduce-Version: 0.3.3.0+Version: 0.3.4.0 Cabal-Version: >=1.8.0.2 Build-Type: Simple License: BSD3@@ -38,8 +38,7 @@ pipes-text >= 0.0.1.0 , pipes-bytestring , void >= 0.6 ,- conceit >= 0.4.0.0 ,- lens-family-core >= 1.1+ conceit >= 0.4.0.0 Exposed-Modules: Pipes.Transduce Pipes.Transduce.ByteString
src/Pipes/Transduce.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -73,6 +73,7 @@ import Data.Monoid hiding (First) import Data.Void import Data.Foldable+import Data.Functor.Constant import Control.Applicative import Control.Applicative.Lift import Control.Monad@@ -90,7 +91,6 @@ import qualified Pipes.Parse import Pipes.Concurrent import Pipes.Safe (SafeT, runSafeT)-import Lens.Family (folding) {- $setup@@ -672,4 +672,17 @@ -- the P.drain bit was difficult to figure out!!! withMVar mvar $ \output -> do runEffect $ textProducer >-> (toOutput output >> Pipes.drain)++-- Lens stuff+type LensLike f a a' b b' = (b -> f b') -> a -> f a'++folding :: (Foldable g, PhantomX f, Applicative f) => (a -> g b) -> LensLike f a a' b b'+folding p f = coerce . traverse_ f . p+{-# INLINE folding #-}++class Functor f => PhantomX f where+ coerce :: f a -> f b++instance PhantomX (Constant a) where+ coerce (Constant x) = (Constant x)
src/Pipes/Transduce/ByteString.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RankNTypes #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Pipes.Transduce.ByteString (
src/Pipes/Transduce/Text.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RankNTypes #-} module Pipes.Transduce.Text ( -- * Collecting input@@ -31,7 +31,6 @@ import Pipes import qualified Pipes.Text import Pipes.Text.Encoding (decodeUtf8) -import Lens.Family (view) import Pipes.Transduce @@ -159,4 +158,11 @@ -} intoLazyText :: Fold1 Text e Data.Text.Lazy.Text intoLazyText = fmap Data.Text.Lazy.fromChunks (withFold Foldl.list)++-- Lens stuff+type Getting r s a = (a -> Const r a) -> s -> Const r s++view :: Getting a s a -> s -> a+view l s = getConst (l Const s)+{-# INLINE view #-}