# attoparsec

committed 1b1183a Merge

Merge.

# .hgtags

d04f4a8c7afdedddd4828c0844ab2b75bdb90789 0.8.5.0
9712028a0311a3d12e213727603b5e84a2b8103c 0.8.5.2
+f4a4d9c2ccb365a8408ee20d2514fac99d44ecb1 0.8.5.3

# Data/Attoparsec/Char8.hs

--
-- >rational "3.foo" == Done 3.0 ".foo"
-- >rational "3e"    == Done 3.0 "e"
+--
+-- This function does not accept string representations of \"NaN\" or
+-- \"Infinity\".
rational :: Fractional a => Parser a
{-# SPECIALIZE rational :: Parser Double #-}
{-# SPECIALIZE rational :: Parser Float #-}
-- results, but for the remaining 5.8%, this function loses precision
-- around the 15th decimal place.  For 0.001% of numbers, this
-- function will lose precision at the 13th or 14th decimal place.
+--
+-- This function does not accept string representations of \"NaN\" or
+-- \"Infinity\".
double :: Parser Double
double = floaty asDouble

-- On integral inputs, it gives perfectly accurate answers, and on
-- floating point inputs, it is slightly less accurate than
-- 'rational'.
+--
+-- This function does not accept string representations of \"NaN\" or
+-- \"Infinity\".
number :: Parser Number
number = floaty \$ \real frac fracDenom ->
if frac == 0 && fracDenom == 0

# Data/Attoparsec/Number.hs

(-) = binop (((I\$!).) . (-)) (((D\$!).) . (-))
{-# INLINE (-) #-}

-    (*) = binop (((I\$!).) . (+)) (((D\$!).) . (+))
+    (*) = binop (((I\$!).) . (*)) (((D\$!).) . (*))
{-# INLINE (*) #-}

abs (I a) = I \$! abs a

# attoparsec.cabal

name:            attoparsec
-version:         0.8.5.2
+version:         0.8.5.3