]> git.immae.eu Git - github/fretlink/text-pipes.git/blobdiff - Pipes/Text/Internal/Codec.hs
Fixed `scan`
[github/fretlink/text-pipes.git] / Pipes / Text / Internal / Codec.hs
index 4b9367fcd97866bdfeca878babe734460c5a1628..075a1520795b64e8be713cc26723db071c0df5b6 100644 (file)
@@ -3,14 +3,16 @@
 -- |
 -- Copyright: 2014 Michael Thompson, 2011 Michael Snoyman, 2010-2011 John Millikin
 -- License: MIT
---
--- Parts of this code were taken from enumerator and conduits, and adapted for pipes.
+--  This Parts of this code were taken from enumerator and conduits, and adapted for pipes
+
+-- This module follows the model of the enumerator and conduits libraries, and defines
+-- 'Codec' s for various encodings. Note that we do not export a 'Codec' for ascii and 
+-- iso8859_1. A 'Lens' in the sense of the pipes library cannot be defined for these, so
+-- special functions appear in @Pipes.Text@
+
 
 module Pipes.Text.Internal.Codec
-    ( Decoding(..)
-    , streamDecodeUtf8
-    , decodeSomeUtf8
-    , Codec(..)
+    ( Codec(..)
     , TextException(..)
     , utf8
     , utf16_le
@@ -41,12 +43,11 @@ import Data.Maybe (catMaybes)
 import Pipes.Text.Internal.Decoding
 import Pipes
 -- | A specific character encoding.
---
--- Since 0.3.0
+
 data Codec = Codec
   { codecName :: Text
   , codecEncode :: Text -> (ByteString, Maybe (TextException, Text))
-  , codecDecode :: ByteString -> Decoding -- (Text, Either (TextException, ByteString) ByteString)
+  , codecDecode :: ByteString -> Decoding 
   }
 
 instance Show Codec where