Skip to content

Commit 81fec00

Browse files
committed
Export jstring_ and scientific parsers
1 parent 6306cec commit 81fec00

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Data/Aeson/Parser.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module Data.Aeson.Parser
3333
json
3434
, value
3535
, jstring
36+
, scientific
3637
-- * Strict parsers
3738
-- $strict
3839
, json'
@@ -46,7 +47,7 @@ module Data.Aeson.Parser
4647

4748
import Prelude ()
4849

49-
import Data.Aeson.Parser.Internal (decodeStrictWith, decodeWith, eitherDecodeStrictWith, eitherDecodeWith, json, json', jstring, value, value')
50+
import Data.Aeson.Parser.Internal (decodeStrictWith, decodeWith, eitherDecodeStrictWith, eitherDecodeWith, json, json', jstring, scientific, value, value')
5051

5152
-- $lazy
5253
--

Data/Aeson/Parser/Internal.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ module Data.Aeson.Parser.Internal
2323
json, jsonEOF
2424
, value
2525
, jstring
26+
, jstring_
27+
, scientific
2628
-- * Strict parsers
2729
, json', jsonEOF'
2830
, value'
@@ -317,7 +319,7 @@ decimal0 = do
317319
then fail "leading zero"
318320
else return (B.foldl' step 0 digits)
319321

320-
{-# INLINE scientific #-}
322+
-- | Parse a JSON number.
321323
scientific :: Parser Scientific
322324
scientific = do
323325
let minus = 45
@@ -347,3 +349,4 @@ scientific = do
347349
(A.satisfy (\ex -> ex == littleE || ex == bigE) *>
348350
fmap (Sci.scientific signedCoeff . (e +)) (signed decimal)) <|>
349351
return (Sci.scientific signedCoeff e)
352+
{-# INLINE scientific #-}

aeson.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ library
9393
Data.Aeson.Encoding.Internal
9494
Data.Aeson.Internal
9595
Data.Aeson.Internal.Time
96+
Data.Aeson.Parser.Internal
9697

9798
-- Deprecated modules
9899
exposed-modules:
@@ -101,7 +102,6 @@ library
101102
other-modules:
102103
Data.Aeson.Encoding.Builder
103104
Data.Aeson.Internal.Functions
104-
Data.Aeson.Parser.Internal
105105
Data.Aeson.Parser.Unescape
106106
Data.Aeson.Parser.Time
107107
Data.Aeson.Types.FromJSON

0 commit comments

Comments
 (0)