From 2f4a83f82d206217456a035b7e8a1e56c585bfd0 Mon Sep 17 00:00:00 2001 From: michaelt Date: Thu, 26 Jun 2014 21:40:43 +0200 Subject: Bumped bounds for pipes-bytestring. Made types agree with pipes-bytestring where possible. Scrapped Iso and profunctor --- Pipes/Text/Encoding.hs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'Pipes/Text') 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 , 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,16 +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' 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, and . 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; @@ -81,7 +77,7 @@ type Iso'_ a b = forall f p . (Functor f, Profunctor p) => p b (f b) -> p a (f a type Codec = forall m r . Monad m - => Lens'_ (Producer ByteString m r) + => Lens' (Producer ByteString m r) (Producer Text m (Producer ByteString m r)) {- | 'decode' is just the ordinary @view@ or @(^.)@ of the lens libraries; -- cgit v1.2.3