mirror of
https://github.com/NorfairKing/autodocodec.git
synced 2024-11-30 03:22:52 +03:00
fixed the bounded integer error message
This commit is contained in:
parent
a6134dcdb9
commit
ccd5a05ef7
@ -1 +1 @@
|
||||
Error in $: Number too big: 1.0e10000
|
||||
Error in $: Number did not fit into bounded integer: 1.0e10000
|
@ -1 +1 @@
|
||||
Error in $: Number too big: -3.0
|
||||
Error in $: Number did not fit into bounded integer: -3.0
|
@ -650,7 +650,7 @@ boundedIntegerCodec :: (Integral i, Bounded i) => JSONCodec i
|
||||
boundedIntegerCodec = bimapCodec go fromIntegral $ NumberCodec Nothing
|
||||
where
|
||||
go s = case Scientific.toBoundedInteger s of
|
||||
Nothing -> Left $ "Number too big: " <> show s
|
||||
Nothing -> Left $ "Number did not fit into bounded integer: " <> show s
|
||||
Just i -> Right i
|
||||
|
||||
-- | A codec for a literal piece of 'Text'.
|
||||
|
Loading…
Reference in New Issue
Block a user