persistent-protobuf 0.1.2 → 0.1.3
raw patch · 2 files changed
+8/−7 lines, 2 filesdep ~persistent
Dependency ranges changed: persistent
Files
Database/Persist/TH/ProtocolBuffers.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} -- | 'derivePersistFieldPB' uses Template Haskell to produce -- 'Database.Persist.PersistField' instances for types with -- 'Text.ProtocolBuffers.Reflections.ReflectDescriptor' and@@ -9,11 +9,12 @@ module Database.Persist.TH.ProtocolBuffers ( derivePersistFieldPB ) where-import Database.Persist.Base+import Database.Persist.Store import Language.Haskell.TH.Syntax import Text.ProtocolBuffers.WireMessage (messageGet, messagePut) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL+import qualified Data.Text as T strictify :: BSL.ByteString -> BS.ByteString strictify x = BS.concat $ BSL.toChunks x@@ -36,9 +37,9 @@ Right s' -> case (messageGet . lazify) s' of Left e ->- Left $ "Invalid " ++ dt ++ ": " ++ e+ Left $ T.concat ["Invalid ", dt, ": ", T.pack e] Right (_, x) | BSL.length x /= 0 ->- Left $ "Invalid " ++ dt ++ ": " ++ "excess input"+ Left $ T.concat ["Invalid ", dt, ": excess input"] Right (msg, _) -> Right msg|] return
persistent-protobuf.cabal view
@@ -1,5 +1,5 @@ Name: persistent-protobuf-Version: 0.1.2+Version: 0.1.3 Synopsis: Template-Haskell helpers for integrating protobufs with persistent. Description: Template-Haskell helpers for integrating protobufs with persistent. Homepage: https://github.com/mstone/persistent-protobuf@@ -19,13 +19,13 @@ source-repository this type: git location: git://github.com/mstone/persistent-protobuf.git- tag: v0.1.2+ tag: v0.1.3 Library Exposed-modules: Database.Persist.TH.ProtocolBuffers Build-Depends: base == 4.*, bytestring -any,- persistent -any,+ persistent == 0.8.*, protocol-buffers -any, protocol-buffers-descriptor -any, template-haskell -any,