Skip to content

Commit f2e375a

Browse files
committed
Add Ord Value
and bump some lower bounds Fixes #704
1 parent ace0e02 commit f2e375a

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

Data/Aeson/Types/Internal.hs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
55
{-# LANGUAGE NoImplicitPrelude #-}
66
{-# LANGUAGE Rank2Types #-}
7+
{-# LANGUAGE StandaloneDeriving #-}
78
#if __GLASGOW_HASKELL__ >= 800
89
-- a) THQ works on cross-compilers and unregisterised GHCs
910
-- b) may make compilation faster as no dynamic loading is ever needed (not sure about this)
@@ -367,6 +368,17 @@ data Value = Object !Object
367368
| Null
368369
deriving (Eq, Read, Show, Typeable, Data, Generic)
369370

371+
-- |
372+
--
373+
-- The ordering is total, consistent with 'Eq' innstance.
374+
-- However, nothing else about the ordering is specified,
375+
-- and it may change from environment to environment and version to version
376+
-- of either this package or its dependencies ('hashable' and 'unordered-containers').
377+
--
378+
-- @since 1.5.2.0
379+
deriving instance Ord Value
380+
-- standalone deriving to attach since annotation.
381+
370382
-- | A newtype wrapper for 'UTCTime' that uses the same non-standard
371383
-- serialization format as Microsoft .NET, whose
372384
-- <https://msdn.microsoft.com/en-us/library/system.datetime(v=vs.110).aspx System.DateTime>

aeson.cabal

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,22 +133,17 @@ library
133133
build-depends: nats >= 1.1.1 && < 1.2,
134134
void >= 0.7.2 && < 0.8
135135

136-
-- cannot use latest version
137-
build-depends:
138-
unordered-containers >= 0.2.8.0 && < 0.3,
139-
140-
-- not in LTS-12.10
141-
tagged >= 0.8.5 && < 0.9,
142-
primitive >= 0.6.3.0 && < 0.8
143-
144136
-- Other dependencies
145137
build-depends:
146138
attoparsec >= 0.13.2.2 && < 0.14,
147139
dlist >= 0.8.0.4 && < 0.9,
148140
hashable >= 1.2.7.0 && < 1.4,
141+
primitive >= 0.7.0.1 && < 0.8,
149142
scientific >= 0.3.6.2 && < 0.4,
143+
tagged >= 0.8.6 && < 0.9,
150144
th-abstraction >= 0.2.8.0 && < 0.4,
151145
these >= 1.1 && < 1.2,
146+
unordered-containers >= 0.2.10.0 && < 0.3,
152147
uuid-types >= 1.0.3 && < 1.1,
153148
vector >= 0.12.0.1 && < 0.13
154149

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
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).
22

3+
### 1.5.2.0
4+
5+
* Add `Ord Value` instance
6+
37
### 1.5.1.0
48

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

0 commit comments

Comments
 (0)