base-4.8.2.0: Basic libraries

Numeric.Natural

Description

The arbitrary-precision `Natural` number type.

Since: 4.8.0.0

Synopsis

# Documentation

data Natural Source

Type representing arbitrary-precision non-negative integers.

Operations whose result would be negative `throw (Underflow :: ArithException)`.

Since: 4.8.0.0

Instances

 Source MethodsenumFrom :: Natural -> [Natural] Source Source Methods(==) :: Natural -> Natural -> Bool(/=) :: Natural -> Natural -> Bool Source MethodsdivMod :: Natural -> Natural -> (Natural, Natural) Source Source Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural Sourcegunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural SourcedataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Natural) SourcedataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) SourcegmapT :: (forall b. Data b => b -> b) -> Natural -> Natural SourcegmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r SourcegmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r SourcegmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] SourcegmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u SourcegmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural SourcegmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural SourcegmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural Source Source Methods Source Methods(<) :: Natural -> Natural -> Bool(<=) :: Natural -> Natural -> Bool(>) :: Natural -> Natural -> Bool(>=) :: Natural -> Natural -> Boolmax :: Natural -> Natural -> Naturalmin :: Natural -> Natural -> Natural Source Methods Source Methods Source MethodsshowList :: [Natural] -> ShowS Source Source Methodsrange :: (Natural, Natural) -> [Natural] Sourceindex :: (Natural, Natural) -> Natural -> Int SourceunsafeIndex :: (Natural, Natural) -> Natural -> IntinRange :: (Natural, Natural) -> Natural -> Bool SourcerangeSize :: (Natural, Natural) -> Int SourceunsafeRangeSize :: (Natural, Natural) -> Int Source Methods Source Methods