@@ -1,6 +1,6 @@
11{-# LANGUAGE BangPatterns, FlexibleInstances, TypeFamilies,
22 TypeSynonymInstances, GADTs #-}
3−{-# OPTIONS_GHC -fno-warn-orphans #-}
3+{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-warnings-deprecations #-}
44
55-- |
66-- Module : Data.Attoparsec.ByteString.Char8
@@ -513,15 +513,6 @@ rational = scientifically realToFrac
513513--
514514-- The syntax accepted by this parser is the same as for 'rational'.
515515--
516−-- /Note/: This function is almost ten times faster than 'rational',
517−-- but is slightly less accurate.
518−--
519−-- The 'Double' type supports about 16 decimal places of accuracy.
520−-- For 94.2% of numbers, this function and 'rational' give identical
521−-- results, but for the remaining 5.8%, this function loses precision
522−-- around the 15th decimal place. For 0.001% of numbers, this
523−-- function will lose precision at the 13th or 14th decimal place.
524−--
525516-- This function does not accept string representations of \"NaN\" or
526517-- \"Infinity\".
527518double :: Parser Double
@@ -531,13 +522,8 @@ double = scientifically Sci.toRealFloat
531522--
532523-- The syntax accepted by this parser is the same as for 'rational'.
533524--
534−-- /Note/: This function is almost ten times faster than 'rational'.
535−-- On integral inputs, it gives perfectly accurate answers, and on
536−-- floating point inputs, it is slightly less accurate than
537−-- 'rational'.
538−--
539−-- This function does not accept string representations of \"NaN\" or
540−-- \"
525+ -- This function does not accept string representations of \"NaN\" or
526+ -- \"Infinity\".
541527number :: Parser Number
542528number = scientifically $ \s ->
543529 let e = Sci.base10Exponent s
@@ -545,6 +531,7 @@ number = scientifically $ \s ->
545531 in if e >= 0
546532 then I (c * 10 ^ e)
547533 else D (Sci.toRealFloat s)
534+{-# DEPRECATED number "Use 'scientific' instead." #-}
548535
549536-- | Parse a scientific number.
550537--