Skip to content

Commit

Permalink
Accounting for an optional leading sign when parsing non-natural numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Feb 27, 2015
1 parent 39965ae commit f4272ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/Network/AWS/Data/Internal/Text.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ class FromText a where

instance FromText Text where parser = AText.takeText
instance FromText ByteString where parser = Text.encodeUtf8 <$> AText.takeText
instance FromText Int where parser = AText.decimal
instance FromText Integer where parser = AText.decimal
instance FromText Scientific where parser = AText.scientific
instance FromText Int where parser = AText.signed AText.decimal
instance FromText Integer where parser = AText.signed AText.decimal
instance FromText Scientific where parser = AText.signed AText.scientific
instance FromText Natural where parser = AText.decimal
instance FromText Double where parser = AText.rational
instance FromText Double where parser = AText.signed AText.rational

instance FromText Bool where
parser = matchCI "false" False <|> matchCI "true" True
Expand Down

0 comments on commit f4272ed

Please sign in to comment.