]> git.immae.eu Git - github/fretlink/text-pipes.git/blobdiff - Pipes/Text/Encoding.hs
travis
[github/fretlink/text-pipes.git] / Pipes / Text / Encoding.hs
index 99433b779b7dc9e4b3f65e25158aa157a1e8d3fe..e00cd430e20771d1ebda6b6c0f2de8bf8a280175 100644 (file)
@@ -41,13 +41,10 @@ module Pipes.Text.Encoding
     , decodeAscii
     , encodeIso8859_1
     , decodeIso8859_1
-    , Lens'_
-    , Iso'_
     ) 
     where
 
 import Data.Functor.Constant (Constant(..))
-import Data.Profunctor (Profunctor)
 import Data.Char (ord)
 import Data.ByteString as B 
 import Data.ByteString (ByteString)
@@ -61,19 +58,15 @@ import Control.Monad (join)
 import Data.Word (Word8)
 import Pipes
 
-type Lens'_ a b = forall f . Functor f => (b -> f b) -> (a -> f a)
-type Iso'_ a b = forall f p . (Functor f, Profunctor p) => p b (f b) -> p a (f a)
-
-type Lens s t a b = forall f . Functor f => (a -> f b) -> (s -> f t)
-
+type Lens' a b = forall f . Functor f => (b -> f b) -> (a -> f a)
 
 {- $lenses
     The 'Codec' type is a simple specializion of 
-    the @Lens'_@ type synonymn used by the standard lens libraries, 
+    the @Lens'@ type synonymn used by the standard lens libraries, 
     <http://hackage.haskell.org/package/lens lens> and 
     <http://hackage.haskell.org/package/lens-family lens-family>. That type, 
     
->   type Lens'_ a b = forall f . Functor f => (b -> f b) -> (a -> f a)
+>   type Lens' a b = forall f . Functor f => (b -> f b) -> (a -> f a)
 
     is just an alias for a Prelude type. Thus you use any particular codec with
     the @view@ / @(^.)@ , @zoom@ and @over@ functions from either of those libraries;
@@ -82,12 +75,11 @@ type Lens s t a b = forall f . Functor f => (a -> f b) -> (s -> f t)
     -}
 
 type Codec
-    =  forall m x y 
+    =  forall m r
     .  Monad m
-    => Lens (Producer ByteString m x)
-            (Producer ByteString m y)
-            (Producer Text m (Producer ByteString m x))
-            (Producer Text m (Producer ByteString m y))
+    => Lens' (Producer ByteString m r)
+             (Producer Text m (Producer ByteString m r))
+
 {- | 'decode' is just the ordinary @view@ or @(^.)@ of the lens libraries;
       exported here under a name appropriate to the material. All of these are
       the same: