packages feed

text-binary 0.2.0 → 0.2.1

raw patch · 3 files changed

+17/−4 lines, 3 files

Files

Data/Text/Binary.hs view
@@ -4,7 +4,6 @@ module Data.Text.Binary where  #if !(MIN_VERSION_text(1,2,1))-import Control.Applicative ((<$>)) import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.Lazy as L@@ -13,9 +12,17 @@  instance Binary T.Text where     put = put . T.encodeUtf8-    get = T.decodeUtf8 <$> get+    get   = do+      bs <- get+      case T.decodeUtf8' bs of+        Left exn -> fail (show exn)+        Right a -> return a  instance Binary L.Text where     put = put . L.encodeUtf8-    get = L.decodeUtf8 <$> get+    get   = do+      bs <- get+      case L.decodeUtf8' bs of+        Left exn -> fail (show exn)+        Right a -> return a #endif
+ changelog view
@@ -0,0 +1,4 @@+-*-change-log-*-++0.2.1+	* Propagate decoding failure in the Get monad
text-binary.cabal view
@@ -1,5 +1,5 @@ name:               text-binary-version:            0.2.0+version:            0.2.1 synopsis:           Binary instances for text types description:     A compatibility layer providing Binary instances for strict@@ -14,6 +14,8 @@ category:           Data homepage:           https://github.com/kawu/text-binary build-type:         Simple++extra-source-files: changelog  library     build-depends: