Skip to content

Commit

Permalink
Export jstring_ and scientific parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Jul 18, 2017
1 parent 6306cec commit 81fec00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Data/Aeson/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module Data.Aeson.Parser
json
, value
, jstring
, scientific
-- * Strict parsers
-- $strict
, json'
Expand All @@ -46,7 +47,7 @@ module Data.Aeson.Parser

import Prelude ()

import Data.Aeson.Parser.Internal (decodeStrictWith, decodeWith, eitherDecodeStrictWith, eitherDecodeWith, json, json', jstring, value, value')
import Data.Aeson.Parser.Internal (decodeStrictWith, decodeWith, eitherDecodeStrictWith, eitherDecodeWith, json, json', jstring, scientific, value, value')

-- $lazy
--
Expand Down
5 changes: 4 additions & 1 deletion Data/Aeson/Parser/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ module Data.Aeson.Parser.Internal
json, jsonEOF
, value
, jstring
, jstring_
, scientific
-- * Strict parsers
, json', jsonEOF'
, value'
Expand Down Expand Up @@ -317,7 +319,7 @@ decimal0 = do
then fail "leading zero"
else return (B.foldl' step 0 digits)

{-# INLINE scientific #-}
-- | Parse a JSON number.
scientific :: Parser Scientific
scientific = do
let minus = 45
Expand Down Expand Up @@ -347,3 +349,4 @@ scientific = do
(A.satisfy (\ex -> ex == littleE || ex == bigE) *>
fmap (Sci.scientific signedCoeff . (e +)) (signed decimal)) <|>
return (Sci.scientific signedCoeff e)
{-# INLINE scientific #-}
2 changes: 1 addition & 1 deletion aeson.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ library
Data.Aeson.Encoding.Internal
Data.Aeson.Internal
Data.Aeson.Internal.Time
Data.Aeson.Parser.Internal

-- Deprecated modules
exposed-modules:
Expand All @@ -101,7 +102,6 @@ library
other-modules:
Data.Aeson.Encoding.Builder
Data.Aeson.Internal.Functions
Data.Aeson.Parser.Internal
Data.Aeson.Parser.Unescape
Data.Aeson.Parser.Time
Data.Aeson.Types.FromJSON
Expand Down

0 comments on commit 81fec00

Please sign in to comment.