packages feed

binary-orphans 0.1.2.0 → 0.1.3.0

raw patch · 3 files changed

+54/−9 lines, 3 filesdep +semigroupsdep ~binarydep ~time

Dependencies added: semigroups

Dependency ranges changed: binary, time

Files

CHANGELOG.md view
@@ -1,2 +1,8 @@+- 0.1.3.0+  - Add `Min`, `Max`, `First`, `Last`, `Option`, and `NonEmpty` instances (from `semigroups`)++- 0.1.2.0+  - Support `scientific >= 0.3.4`+ - 0.1.1.0-  - Add Dual, All, Any, Sum, Product, First and Last instances+  - Add `Dual`, `All`, `Any`, `Sum`, `Product`, `First` and `Last` instances
binary-orphans.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           binary-orphans-version:        0.1.2.0+version:        0.1.3.0 synopsis:       Orphan instances for binary description:    `binary-orphans` defines orphan instances for types in some popular packages. category:       Web@@ -32,12 +32,13 @@   build-depends:       base                     >=4.7  && <4.9     , aeson                    >=0.8  && <0.10.1-    , binary                   >=0.7  && <0.7.7+    , binary                   >=0.7  && <0.8.1     , hashable                 >=1.2  && <1.3     , scientific               >=0.3  && <0.4-    , tagged                   >=0.7  && <0.8.2+    , semigroups               >=0.16 && <0.18.1+    , tagged                   >=0.7  && <0.8.3     , text                     >=1.2  && <1.3-    , time                     >=1.4  && <1.5.1+    , time                     >=1.4  && <1.6.1     , unordered-containers     >=0.2  && <0.3     , vector                   >=0.10 && <0.12     , text-binary              >=0.1  && <0.3@@ -55,12 +56,13 @@   build-depends:       base                     >=4.7  && <4.9     , aeson                    >=0.8  && <0.10.1-    , binary                   >=0.7  && <0.7.7+    , binary                   >=0.7  && <0.8.1     , hashable                 >=1.2  && <1.3     , scientific               >=0.3  && <0.4-    , tagged                   >=0.7  && <0.8.2+    , semigroups               >=0.16 && <0.18.1+    , tagged                   >=0.7  && <0.8.3     , text                     >=1.2  && <1.3-    , time                     >=1.4  && <1.5.1+    , time                     >=1.4  && <1.6.1     , unordered-containers     >=0.2  && <0.3     , vector                   >=0.10 && <0.12     , binary-orphans
src/Data/Binary/Orphans.hs view
@@ -11,6 +11,7 @@ -- --   * aeson --   * scientific (prior to scientific-0.3.4.0)+--   * semigroups --   * tagged --   * text (through text-binary, or text >= 1.2.1) --   * time@@ -32,7 +33,9 @@ import qualified Data.HashMap.Lazy as HM import qualified Data.HashSet as HS import           Data.Hashable (Hashable)+import qualified Data.List.NonEmpty as NE import qualified Data.Monoid as Monoid+import qualified Data.Semigroup as Semigroup import qualified Data.Tagged as Tagged import qualified Data.Time as Time @@ -84,9 +87,11 @@   put = put . Tagged.unTagged   get = fmap Tagged.Tagged get +#if !MIN_VERSION_binary(0,8,0) instance Binary (Fixed a) where   put (MkFixed a) = put a   get = MkFixed `liftM` get+#endif  instance Binary Time.Day where   get = fmap Time.ModifiedJulianDay get@@ -122,7 +127,7 @@  -- Monoid --- | /Since: binary-orphans-0.1.1.0/+-- | @since 0.1.1.0 instance Binary a => Binary (Monoid.Dual a) -- | /Since: binary-orphans-0.1.1.0/ instance Binary Monoid.All@@ -136,3 +141,35 @@ instance Binary a => Binary (Monoid.First a) -- | /Since: binary-orphans-0.1.1.0/ instance Binary a => Binary (Monoid.Last a)++-- Semigroup++-- | /Since: binary-orphans-0.1.3.0/+instance Binary a => Binary (Semigroup.Min a) where+  get = fmap Semigroup.Min get+  put = put . Semigroup.getMin++-- | /Since: binary-orphans-0.1.3.0/+instance Binary a => Binary (Semigroup.Max a) where+  get = fmap Semigroup.Max get+  put = put . Semigroup.getMax++-- | /Since: binary-orphans-0.1.3.0/+instance Binary a => Binary (Semigroup.First a) where+  get = fmap Semigroup.First get+  put = put . Semigroup.getFirst++-- | /Since: binary-orphans-0.1.3.0/+instance Binary a => Binary (Semigroup.Last a) where+  get = fmap Semigroup.Last get+  put = put . Semigroup.getLast++-- | /Since: binary-orphans-0.1.3.0/+instance Binary a => Binary (Semigroup.Option a) where+  get = fmap Semigroup.Option get+  put = put . Semigroup.getOption++-- | /Since: binary-orphans-0.1.3.0/+instance Binary a => Binary (NE.NonEmpty a) where+  get = fmap NE.fromList get+  put = put . NE.toList