@@ -114,7 +114,7 @@ chompInt fp !offset terminal !n =
114 chompInt fp (offset + 1) terminal (10 * n + fromIntegral (word - 0x30 {- 0 -}))
114 chompInt fp (offset + 1) terminal (10 * n + fromIntegral (word - 0x30 {- 0 -}))
116 else if word == 0x2E {- . -} then
116 else if word == 0x2E {- . -} then
117− chompFraction fp (offset + 1) terminal
117+ chompFraction fp (offset + 1) terminal n
119 else if word == 0x65 {- e -} || word == 0x45 {- E -} then
119 else if word == 0x65 {- e -} || word == 0x45 {- E -} then
120 chompExponent fp (offset + 1) terminal
120 chompExponent fp (offset + 1) terminal
@@ -130,16 +130,16 @@ chompInt fp !offset terminal !n =
130-- CHOMP FRACTION
130-- CHOMP FRACTION
133−chompFraction :: ForeignPtr Word8 -> Int -> Int -> Outcome
133+chompFraction :: ForeignPtr Word8 -> Int -> Int -> Int -> Outcome
134−chompFraction fp offset terminal =
134+chompFraction fp offset terminal n =
135 if offset >= terminal then
135 if offset >= terminal then
136− Err offset E.BadNumberDot
136+ Err offset (E.BadNumberDot n)
138 else if isDecimalDigit (I.unsafeIndex fp offset) then
138 else if isDecimalDigit (I.unsafeIndex fp offset) then
139 chompFractionHelp fp (offset + 1) terminal
139 chompFractionHelp fp (offset + 1) terminal
142− Err offset E.BadNumberDot
142+ Err offset (E.BadNumberDot n)
145chompFractionHelp :: ForeignPtr Word8 -> Int -> Int -> Outcome
145chompFractionHelp :: ForeignPtr Word8 -> Int -> Int -> Outcome
@@ -215,7 +215,7 @@ chompZero fp offset terminal =
215 chompHexInt fp (offset + 1) terminal
215 chompHexInt fp (offset + 1) terminal
217 else if word == 0x2E {- . -} then
217 else if word == 0x2E {- . -} then
218− chompFraction fp (offset + 1) terminal
218+ chompFraction fp (offset + 1) terminal 0
220 else if isDecimalDigit word then
220 else if isDecimalDigit word then
221 Err offset E.BadNumberZero
221 Err offset E.BadNumberZero