We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e79d5a3 commit 6de6977Copy full SHA for 6de6977
src/Text/Megaparsec/Utils.hs
@@ -117,7 +117,9 @@ posNumParser = read <$> some digitChar
117
-- | Parse an integer, without any space between minus sign and digits.
118
numParser
119
:: Ord e
120
- => Parsec e String Int
+ => Num a
121
+ => Read a
122
+ => Parsec e String a
123
numParser = (char '-' >> negate <$> posNumParser) <|> posNumParser
124
125
-- | Convert a 'Parsec' parser into a 'Parser' suited for 'Data.Aeson.FromJSON'
0 commit comments