Skip to content

Commit

Permalink
Merge pull request haskell#786 from phadej/ord-value
Browse files Browse the repository at this point in the history
Add Ord Value
  • Loading branch information
bergmark authored Jun 8, 2020
2 parents ace0e02 + f2e375a commit a8add7d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
12 changes: 12 additions & 0 deletions Data/Aeson/Types/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE StandaloneDeriving #-}
#if __GLASGOW_HASKELL__ >= 800
-- a) THQ works on cross-compilers and unregisterised GHCs
-- b) may make compilation faster as no dynamic loading is ever needed (not sure about this)
Expand Down Expand Up @@ -367,6 +368,17 @@ data Value = Object !Object
| Null
deriving (Eq, Read, Show, Typeable, Data, Generic)

-- |
--
-- The ordering is total, consistent with 'Eq' innstance.
-- However, nothing else about the ordering is specified,
-- and it may change from environment to environment and version to version
-- of either this package or its dependencies ('hashable' and 'unordered-containers').
--
-- @since 1.5.2.0
deriving instance Ord Value
-- standalone deriving to attach since annotation.

-- | A newtype wrapper for 'UTCTime' that uses the same non-standard
-- serialization format as Microsoft .NET, whose
-- <https://msdn.microsoft.com/en-us/library/system.datetime(v=vs.110).aspx System.DateTime>
Expand Down
11 changes: 3 additions & 8 deletions aeson.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,17 @@ library
build-depends: nats >= 1.1.1 && < 1.2,
void >= 0.7.2 && < 0.8

-- cannot use latest version
build-depends:
unordered-containers >= 0.2.8.0 && < 0.3,

-- not in LTS-12.10
tagged >= 0.8.5 && < 0.9,
primitive >= 0.6.3.0 && < 0.8

-- Other dependencies
build-depends:
attoparsec >= 0.13.2.2 && < 0.14,
dlist >= 0.8.0.4 && < 0.9,
hashable >= 1.2.7.0 && < 1.4,
primitive >= 0.7.0.1 && < 0.8,
scientific >= 0.3.6.2 && < 0.4,
tagged >= 0.8.6 && < 0.9,
th-abstraction >= 0.2.8.0 && < 0.4,
these >= 1.1 && < 1.2,
unordered-containers >= 0.2.10.0 && < 0.3,
uuid-types >= 1.0.3 && < 1.1,
vector >= 0.12.0.1 && < 0.13

Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
For the latest version of this document, please see [https://github.com/bos/aeson/blob/master/changelog.md](https://github.com/bos/aeson/blob/master/changelog.md).

### 1.5.2.0

* Add `Ord Value` instance

### 1.5.1.0

* Add instances for `these`, thanks to Oleg Grenrus.
Expand Down

0 comments on commit a8add7d

Please sign in to comment.