diff options
author | michaelt <what_is_it_to_do_anything@yahoo.com> | 2014-06-23 16:25:46 +0200 |
---|---|---|
committer | michaelt <what_is_it_to_do_anything@yahoo.com> | 2014-06-23 16:25:46 +0200 |
commit | d199072b55bc0c43a3eeeb5e8dd99c158d487901 (patch) | |
tree | 1efdcbaab9f46794e77192a690e6f35132e3ee2b /Pipes/Text | |
parent | c3c19f9b4f0564f3fae39a18555f6cfb322ee7c9 (diff) | |
download | text-pipes-d199072b55bc0c43a3eeeb5e8dd99c158d487901.tar.gz text-pipes-d199072b55bc0c43a3eeeb5e8dd99c158d487901.tar.zst text-pipes-d199072b55bc0c43a3eeeb5e8dd99c158d487901.zip |
Revert "started generalizing lenses"
This reverts commit c3c19f9b4f0564f3fae39a18555f6cfb322ee7c9.
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 99433b7..991000f 100644 --- a/Pipes/Text/Encoding.hs +++ b/Pipes/Text/Encoding.hs | |||
@@ -64,9 +64,6 @@ import Pipes | |||
64 | type Lens'_ a b = forall f . Functor f => (b -> f b) -> (a -> f a) | 64 | 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) | 65 | type Iso'_ a b = forall f p . (Functor f, Profunctor p) => p b (f b) -> p a (f a) |
66 | 66 | ||
67 | type Lens s t a b = forall f . Functor f => (a -> f b) -> (s -> f t) | ||
68 | |||
69 | |||
70 | {- $lenses | 67 | {- $lenses |
71 | The 'Codec' type is a simple specializion of | 68 | The 'Codec' type is a simple specializion of |
72 | the @Lens'_@ type synonymn used by the standard lens libraries, | 69 | the @Lens'_@ type synonymn used by the standard lens libraries, |
@@ -82,12 +79,11 @@ type Lens s t a b = forall f . Functor f => (a -> f b) -> (s -> f t) | |||
82 | -} | 79 | -} |
83 | 80 | ||
84 | type Codec | 81 | type Codec |
85 | = forall m x y | 82 | = forall m r |
86 | . Monad m | 83 | . Monad m |
87 | => Lens (Producer ByteString m x) | 84 | => Lens'_ (Producer ByteString m r) |
88 | (Producer ByteString m y) | 85 | (Producer Text m (Producer ByteString m r)) |
89 | (Producer Text m (Producer ByteString m x)) | 86 | |
90 | (Producer Text m (Producer ByteString m y)) | ||
91 | {- | 'decode' is just the ordinary @view@ or @(^.)@ of the lens libraries; | 87 | {- | 'decode' is just the ordinary @view@ or @(^.)@ of the lens libraries; |
92 | exported here under a name appropriate to the material. All of these are | 88 | exported here under a name appropriate to the material. All of these are |
93 | the same: | 89 | the same: |