avro 0.4.3.0 → 0.4.4.0
raw patch · 2 files changed
+7/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- avro.cabal +1/−1
- src/Data/Avro/Deriving.hs +6/−0
avro.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12 name: avro-version: 0.4.3.0+version: 0.4.4.0 synopsis: Avro serialization support for Haskell description: Avro serialization and deserialization support for Haskell category: Data
src/Data/Avro/Deriving.hs view
@@ -288,6 +288,12 @@ deriveAvro' :: Schema -> Q [Dec] deriveAvro' = deriveAvroWithOptions' defaultDeriveOptions +-- | Same as 'deriveAvro' but takes a ByteString rather than FilePath+deriveAvroFromByteString :: LBS.ByteString -> Q [Dec]+deriveAvroFromByteString bs = case eitherDecode bs of+ Right schema -> deriveAvroWithOptions' defaultDeriveOptions schema+ Left err -> fail $ "Unable to generate AVRO for bytestring: " <> err+ -- | Same as 'deriveFromAvroWithOptions' but uses -- 'defaultDeriveOptions'. --