attoparsec-0.14.4: Fast combinator parsing for bytestrings and text

Copyright | Bryan O'Sullivan 2007-2015
License | BSD3
Maintainer | bos@serpentine.com
Stability | experimental
Portability | unknown
Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Attoparsec.Number

Description

Deprecated: This module will be removed in the next major release.

This module is deprecated, and both the module and `Number` type will be removed in the next major release. Use the scientific package and the `Scientific` type instead.

A simple number type, useful for parsing both exact and inexact quantities without losing much precision.

Synopsis

- data Number
  - = I !Integer
  - | D !Double

# Documentation

data Number Source #

A numeric type that can represent integers accurately, and floating point numbers to the precision of a `Double`.

Note: this type is deprecated, and will be removed in the next major release. Use the `Scientific` type instead.

Constructors

I !Integer |
D !Double |

#### Instances

Instances details

NFData Number Source # |
Instance details Defined in Data.Attoparsec.Number Methods rnf :: Number -> () Source #
Data Number Source # |

Instance details

Defined in Data.Attoparsec.Number

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Number -> c Number Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Number Source #

toConstr :: Number -> Constr Source #

dataTypeOf :: Number -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Number) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Number) Source #

gmapT :: (forall b. Data b => b -> b) -> Number -> Number Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Number -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Number -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Number -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Number -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Number -> m Number Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Number -> m Number Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Number -> m Number Source #

Num Number Source # |
Instance details Defined in Data.Attoparsec.Number Methods (+) :: Number -> Number -> Number Source # (-) :: Number -> Number -> Number Source # (*) :: Number -> Number -> Number Source # negate :: Number -> Number Source # abs :: Number -> Number Source # signum :: Number -> Number Source # fromInteger :: Integer -> Number Source #
Fractional Number Source # |
Instance details Defined in Data.Attoparsec.Number Methods (/) :: Number -> Number -> Number Source # recip :: Number -> Number Source # fromRational :: Rational -> Number Source #
Real Number Source # |
Instance details Defined in Data.Attoparsec.Number Methods toRational :: Number -> Rational Source #
RealFrac Number Source # |
Instance details Defined in Data.Attoparsec.Number Methods properFraction :: Integral b => Number -> (b, Number) Source # truncate :: Integral b => Number -> b Source # round :: Integral b => Number -> b Source # ceiling :: Integral b => Number -> b Source # floor :: Integral b => Number -> b Source #
Show Number Source # |
Instance details Defined in Data.Attoparsec.Number Methods showsPrec :: Int -> Number -> ShowS Source # show :: Number -> String Source # showList :: [Number] -> ShowS Source #
Eq Number Source # |
Instance details Defined in Data.Attoparsec.Number Methods (==) :: Number -> Number -> Bool Source # (/=) :: Number -> Number -> Bool Source #
Ord Number Source # |
Instance details Defined in Data.Attoparsec.Number Methods compare :: Number -> Number -> Ordering Source # (<) :: Number -> Number -> Bool Source # (<=) :: Number -> Number -> Bool Source # (>) :: Number -> Number -> Bool Source # (>=) :: Number -> Number -> Bool Source # max :: Number -> Number -> Number Source # min :: Number -> Number -> Number Source #