diff options
Diffstat (limited to 'Pipes/Text')
-rw-r--r-- | Pipes/Text/Encoding.hs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Pipes/Text/Encoding.hs b/Pipes/Text/Encoding.hs index 991000f..e00cd43 100644 --- a/Pipes/Text/Encoding.hs +++ b/Pipes/Text/Encoding.hs | |||
@@ -41,13 +41,10 @@ module Pipes.Text.Encoding | |||
41 | , decodeAscii | 41 | , decodeAscii |
42 | , encodeIso8859_1 | 42 | , encodeIso8859_1 |
43 | , decodeIso8859_1 | 43 | , decodeIso8859_1 |
44 | , Lens'_ | ||
45 | , Iso'_ | ||
46 | ) | 44 | ) |
47 | where | 45 | where |
48 | 46 | ||
49 | import Data.Functor.Constant (Constant(..)) | 47 | import Data.Functor.Constant (Constant(..)) |
50 | import Data.Profunctor (Profunctor) | ||
51 | import Data.Char (ord) | 48 | import Data.Char (ord) |
52 | import Data.ByteString as B | 49 | import Data.ByteString as B |
53 | import Data.ByteString (ByteString) | 50 | import Data.ByteString (ByteString) |
@@ -61,16 +58,15 @@ import Control.Monad (join) | |||
61 | import Data.Word (Word8) | 58 | import Data.Word (Word8) |
62 | import Pipes | 59 | import Pipes |
63 | 60 | ||
64 | type Lens'_ a b = forall f . Functor f => (b -> f b) -> (a -> f a) | 61 | type Lens' a b = forall f . Functor f => (b -> f b) -> (a -> f a) |
65 | type Iso'_ a b = forall f p . (Functor f, Profunctor p) => p b (f b) -> p a (f a) | ||
66 | 62 | ||
67 | {- $lenses | 63 | {- $lenses |
68 | The 'Codec' type is a simple specializion of | 64 | The 'Codec' type is a simple specializion of |
69 | the @Lens'_@ type synonymn used by the standard lens libraries, | 65 | the @Lens'@ type synonymn used by the standard lens libraries, |
70 | <http://hackage.haskell.org/package/lens lens> and | 66 | <http://hackage.haskell.org/package/lens lens> and |
71 | <http://hackage.haskell.org/package/lens-family lens-family>. That type, | 67 | <http://hackage.haskell.org/package/lens-family lens-family>. That type, |
72 | 68 | ||
73 | > type Lens'_ a b = forall f . Functor f => (b -> f b) -> (a -> f a) | 69 | > type Lens' a b = forall f . Functor f => (b -> f b) -> (a -> f a) |
74 | 70 | ||
75 | is just an alias for a Prelude type. Thus you use any particular codec with | 71 | is just an alias for a Prelude type. Thus you use any particular codec with |
76 | the @view@ / @(^.)@ , @zoom@ and @over@ functions from either of those libraries; | 72 | the @view@ / @(^.)@ , @zoom@ and @over@ functions from either of those libraries; |
@@ -81,7 +77,7 @@ type Iso'_ a b = forall f p . (Functor f, Profunctor p) => p b (f b) -> p a (f a | |||
81 | type Codec | 77 | type Codec |
82 | = forall m r | 78 | = forall m r |
83 | . Monad m | 79 | . Monad m |
84 | => Lens'_ (Producer ByteString m r) | 80 | => Lens' (Producer ByteString m r) |
85 | (Producer Text m (Producer ByteString m r)) | 81 | (Producer Text m (Producer ByteString m r)) |
86 | 82 | ||
87 | {- | 'decode' is just the ordinary @view@ or @(^.)@ of the lens libraries; | 83 | {- | 'decode' is just the ordinary @view@ or @(^.)@ of the lens libraries; |