avro 0.6.0.1 → 0.6.0.2
raw patch · 3 files changed
+67/−68 lines, 3 filesdep +th-lift-instancesdep ~doctestPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: th-lift-instances
Dependency ranges changed: doctest
API changes (from Hackage documentation)
- Data.Avro.Deriving.Lift: instance (Language.Haskell.TH.Syntax.Lift k, Language.Haskell.TH.Syntax.Lift v) => Language.Haskell.TH.Syntax.Lift (Data.HashMap.Internal.HashMap k v)
- Data.Avro.Deriving.Lift: instance Language.Haskell.TH.Syntax.Lift Data.ByteString.Internal.ByteString
- Data.Avro.Deriving.Lift: instance Language.Haskell.TH.Syntax.Lift Data.Text.Internal.Text
- Data.Avro.Deriving.Lift: instance Language.Haskell.TH.Syntax.Lift a => Language.Haskell.TH.Syntax.Lift (Data.Vector.Vector a)
Files
- avro.cabal +46/−42
- bench/Main.hs +17/−10
- src/Data/Avro/Deriving/Lift.hs +4/−16
avro.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: avro-version: 0.6.0.1+version: 0.6.0.2 synopsis: Avro serialization support for Haskell description: Avro serialization and deserialization support for Haskell category: Data@@ -11,7 +11,7 @@ maintainer: Alexey Raga <alexey.raga@gmail.com> license: BSD-3-Clause license-file: LICENSE-tested-with: GHC == 9.0.1, GHC == 8.10.7, GHC == 8.8.4, GHC == 8.6.5+tested-with: GHC == 9.2.2, GHC == 9.0.2, GHC == 8.10.7, GHC == 8.8.4, GHC == 8.6.5 build-type: Simple extra-source-files: README.md ChangeLog.md@@ -44,48 +44,50 @@ manual: True default: False -common base { build-depends: base >= 4 && < 5 }+common base { build-depends: base >= 4 && < 5 } -common aeson { build-depends: aeson >= 2.0.1.0 }-common array { build-depends: array }-common base16-bytestring { build-depends: base16-bytestring }-common bifunctors { build-depends: bifunctors }-common big-decimal { build-depends: HasBigDecimal }-common binary { build-depends: binary }-common bytestring { build-depends: bytestring }-common containers { build-depends: containers }-common data-binary-ieee754 { build-depends: data-binary-ieee754 }-common deepseq { build-depends: deepseq }-common directory { build-depends: directory }-common doctest { build-depends: doctest >= 0.16.2 && < 0.19 }-common doctest-discover { build-depends: doctest-discover >= 0.2 && < 0.3 }-common extra { build-depends: extra }-common fail { build-depends: fail }-common gauge { build-depends: gauge }-common generic-lens { build-depends: generic-lens >= 1.2 && < 2.3 }-common hashable { build-depends: hashable }-common hedgehog { build-depends: hedgehog }-common hw-hspec-hedgehog { build-depends: hw-hspec-hedgehog }-common hspec { build-depends: hspec }-common lens { build-depends: lens }-common lens-aeson { build-depends: lens-aeson }-common mtl { build-depends: mtl }-common QuickCheck { build-depends: QuickCheck }-common random { build-depends: random }-common raw-strings-qq { build-depends: raw-strings-qq }-common scientific { build-depends: scientific }-common semigroups { build-depends: semigroups }-common tagged { build-depends: tagged }+common aeson { build-depends: aeson >= 2.0.1.0 }+common array { build-depends: array }+common base16-bytestring { build-depends: base16-bytestring }+common bifunctors { build-depends: bifunctors }+common big-decimal { build-depends: HasBigDecimal }+common binary { build-depends: binary }+common bytestring { build-depends: bytestring }+common containers { build-depends: containers }+common data-binary-ieee754 { build-depends: data-binary-ieee754 }+common deepseq { build-depends: deepseq }+common directory { build-depends: directory }+common doctest { build-depends: doctest >= 0.16.2 && < 0.21 }+common doctest-discover { build-depends: doctest-discover >= 0.2 && < 0.3 }+common extra { build-depends: extra }+common fail { build-depends: fail }+common generic-lens { build-depends: generic-lens >= 1.2 && < 2.3 }+common hashable { build-depends: hashable }+common hedgehog { build-depends: hedgehog }+common hw-hspec-hedgehog { build-depends: hw-hspec-hedgehog }+common hspec { build-depends: hspec }+common lens { build-depends: lens }+common lens-aeson { build-depends: lens-aeson }+common mtl { build-depends: mtl }+common QuickCheck { build-depends: QuickCheck }+common random { build-depends: random }+common raw-strings-qq { build-depends: raw-strings-qq }+common scientific { build-depends: scientific }+common semigroups { build-depends: semigroups }+common tagged { build-depends: tagged } common text { build-depends: text >= 1.2.3 && < 1.3 || >= 2.0 && < 2.1 }-common time { build-depends: time }-common template-haskell { build-depends: template-haskell >= 2.4 && < 3 }-common tf-random { build-depends: tf-random }-common transformers { build-depends: transformers >= 0.5.6.2 && < 0.7 }-common unordered-containers { build-depends: unordered-containers }-common uuid { build-depends: uuid }-common vector { build-depends: vector }-common zlib { build-depends: zlib }+common time { build-depends: time }+common template-haskell { build-depends: template-haskell >= 2.4 && < 3 }+common tf-random { build-depends: tf-random }+common th-lift-instances { build-depends: th-lift-instances }+common transformers { build-depends: transformers >= 0.5.6.2 && < 0.7 }+common unordered-containers { build-depends: unordered-containers }+common uuid { build-depends: uuid }+common vector { build-depends: vector }+common zlib { build-depends: zlib } +common gauge { if arch(x86_64) || arch(i386) { build-depends: gauge } }+ common config default-language: Haskell2010 if flag(dev)@@ -113,6 +115,7 @@ , text , time , tf-random+ , th-lift-instances , unordered-containers , uuid , vector@@ -262,7 +265,8 @@ default-language: Haskell2010 type: exitcode-stdio-1.0 main-is: Main.hs- other-modules: Bench.Deconflict+ if arch(x86_64) || arch(i386)+ other-modules: Bench.Deconflict Bench.Deconflict.Reader Bench.Deconflict.Writer Bench.Encoding
bench/Main.hs view
@@ -1,18 +1,25 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE ScopedTypeVariables #-}-module Main-where +module Main where++#if defined(i386_HOST_ARCH) || defined(x86_64_HOST_ARCH) import qualified Bench.Deconflict as Deconflict import qualified Bench.Encoding as Encoding- import Gauge+#endif main :: IO ()-main = defaultMain- [ Deconflict.values- , Encoding.encodeToBS- , Encoding.encodeContainer- , Encoding.roundtripContainer- , Deconflict.container- ]+main =+#if defined(i386_HOST_ARCH) || defined(x86_64_HOST_ARCH)+ defaultMain+ [ Deconflict.values+ , Encoding.encodeToBS+ , Encoding.encodeContainer+ , Encoding.roundtripContainer+ , Deconflict.container+ ]+#else+ return ()+#endif
src/Data/Avro/Deriving/Lift.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveLift #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-}@@ -12,22 +11,11 @@ import qualified Data.HashMap.Strict as HashMap import qualified Data.Text as Text import qualified Data.Vector as Vector-import Language.Haskell.TH.Syntax (Lift (..))--instance Lift ByteString.ByteString where- lift b = [| ByteString.pack $(lift $ ByteString.unpack b) |]--#if MIN_VERSION_text(1,2,4)-#else-instance Lift Text.Text where- lift t = [| Text.pack $(lift $ Text.unpack t) |]-#endif--instance Lift a => Lift (Vector.Vector a) where- lift v = [| Vector.fromList $(lift $ Vector.toList v) |]+import qualified Language.Haskell.TH.Lib as TH+import qualified Language.Haskell.TH.Syntax as TH -instance (Lift k, Lift v) => Lift (HashMap.HashMap k v) where- lift m = [| HashMap.fromList $(lift $ HashMap.toList m) |]+import Language.Haskell.TH.Syntax (Lift (..))+import Instances.TH.Lift () deriving instance Lift Schema.DefaultValue deriving instance Lift Schema.Field