packages feed

enumerator 0.4.3 → 0.4.3.1

raw patch · 4 files changed

+30/−4 lines, 4 filesdep ~text

Dependency ranges changed: text

Files

enumerator.cabal view
@@ -1,5 +1,5 @@ name: enumerator-version: 0.4.3+version: 0.4.3.1 synopsis: Implementation of Oleg Kiselyov's left-fold enumerators license: MIT license-file: license.txt@@ -25,6 +25,10 @@   type: bazaar   location: http://john-millikin.com/software/enumerator/ +-- text-0.11 changed some function names to appease a few bikeshedding idiots+-- in -cafe; to support it, a special compatibility module is needed.+flag text-names-broken+ library   ghc-options: -Wall   hs-source-dirs: hs@@ -32,7 +36,6 @@   build-depends:       transformers >= 0.2 && < 0.3     , bytestring >= 0.9 && < 0.10-    , text >= 0.7 && < 0.12    if impl(ghc >= 6.10)     build-depends:@@ -42,6 +45,15 @@         base >= 3 && < 4       , extensible-exceptions >= 0.1 && < 0.2 +  if flag(text-names-broken)+    hs-source-dirs: hs/text-0.11+    build-depends:+      text >= 0.11 && < 0.12+  else+    hs-source-dirs: hs/text-0.10+    build-depends:+      text >= 0.7 && < 0.11+   exposed-modules:     Data.Enumerator     Data.Enumerator.IO@@ -49,3 +61,4 @@    other-modules:     Data.Enumerator.Util+    Data.Enumerator.Text.Compat
hs/Data/Enumerator/Text.hs view
@@ -27,6 +27,7 @@ 	, ascii 	, iso8859_1 	) where+import qualified Data.Enumerator.Text.Compat as TC import Control.Monad.IO.Class (MonadIO) import qualified Control.Exception as E import qualified Data.Text as T@@ -201,7 +202,7 @@ ascii :: Codec ascii = Codec name (mapEither enc) dec where 	name = T.pack "ASCII"-	enc t = case T.findBy (\c -> ord c > 0x7F) t of+	enc t = case TC.findBy (\c -> ord c > 0x7F) t of 		Nothing -> Right . B8.pack . T.unpack $ t 		Just c -> illegalEnc name c 	dec bytes = case B.find (\w -> w > 0x7F) bytes of@@ -210,7 +211,7 @@ iso8859_1 :: Codec iso8859_1 = Codec name (mapEither enc) dec where 	name = T.pack "ISO-8859-1"-	enc t = case T.findBy (\c -> ord c > 0xFF) t of+	enc t = case TC.findBy (\c -> ord c > 0xFF) t of 		Nothing -> Right . B8.pack . T.unpack $ t 		Just c -> illegalEnc name c 	dec bytes = Right (T.pack (B8.unpack bytes), B.empty)
+ hs/text-0.10/Data/Enumerator/Text/Compat.hs view
@@ -0,0 +1,6 @@+module Data.Enumerator.Text.Compat+	( findBy+	) where+import qualified Data.Text as T+findBy :: (Char -> Bool) -> T.Text -> Maybe Char+findBy = T.findBy
+ hs/text-0.11/Data/Enumerator/Text/Compat.hs view
@@ -0,0 +1,6 @@+module Data.Enumerator.Text.Compat+	( findBy+	) where+import qualified Data.Text as T+findBy :: (Char -> Bool) -> T.Text -> Maybe Char+findBy = T.find