Skip to content

Commit 161f14d

Browse files
committed
Remove deprecated withNumber, use withScientific instead
1 parent 64715d4 commit 161f14d

File tree

5 files changed

+4
-11
lines changed

5 files changed

+4
-11
lines changed

Data/Aeson.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ module Data.Aeson
113113
, withObject
114114
, withText
115115
, withArray
116-
, withNumber
117116
, withScientific
118117
, withBool
119118
, withEmbeddedJSON

Data/Aeson/Types.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ module Data.Aeson.Types
8181
, withObject
8282
, withText
8383
, withArray
84-
, withNumber
8584
, withScientific
8685
, withBool
8786
, withEmbeddedJSON

Data/Aeson/Types/Class.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ module Data.Aeson.Types.Class
7070
, withObject
7171
, withText
7272
, withArray
73-
, withNumber
7473
, withScientific
7574
, withBool
7675
, withEmbeddedJSON

Data/Aeson/Types/FromJSON.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ module Data.Aeson.Types.FromJSON
5252
, withObject
5353
, withText
5454
, withArray
55-
, withNumber
5655
, withScientific
5756
, withBool
5857
, withEmbeddedJSON
@@ -646,13 +645,6 @@ withArray _ f (Array arr) = f arr
646645
withArray expected _ v = typeMismatch expected v
647646
{-# INLINE withArray #-}
648647

649-
-- | @'withNumber' expected f value@ applies @f@ to the 'Number' when @value@
650-
-- is a 'Number' and fails using @'typeMismatch' expected@ otherwise.
651-
withNumber :: String -> (Number -> Parser a) -> Value -> Parser a
652-
withNumber expected f = withScientific expected (f . scientificToNumber)
653-
{-# INLINE withNumber #-}
654-
{-# DEPRECATED withNumber "Use withScientific instead" #-}
655-
656648
-- | @'withScientific' expected f value@ applies @f@ to the 'Scientific' number
657649
-- when @value@ is a 'Number' and fails using @'typeMismatch' expected@
658650
-- otherwise.

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.4.0.0 (upcoming)
4+
5+
* Remove deprecated `withNumber`, use `withScientific` instead.
6+
37
### 1.3.1.1
48

59
* Catch 0 denominators when parsing Ratio

0 commit comments

Comments
 (0)