base-4.9.1.0: Basic libraries

Numeric.Natural

Description

The arbitrary-precision Natural number type.

Since: 4.8.0.0

Synopsis

Documentation

data Natural #

Type representing arbitrary-precision non-negative integers.

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

Since: 4.8.0.0

Instances

 # MethodsenumFrom :: Natural -> [Natural] #enumFromThen :: Natural -> Natural -> [Natural] #enumFromTo :: Natural -> Natural -> [Natural] #enumFromThenTo :: Natural -> Natural -> Natural -> [Natural] # # Methods # MethodsquotRem :: Natural -> Natural -> (Natural, Natural) #divMod :: Natural -> Natural -> (Natural, Natural) # # Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural #dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Natural) #dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) #gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural # # Methods # Methods # Methods # Methods # MethodsshowList :: [Natural] -> ShowS # # Methodsrange :: (Natural, Natural) -> [Natural] #index :: (Natural, Natural) -> Natural -> Int #unsafeIndex :: (Natural, Natural) -> Natural -> IntinRange :: (Natural, Natural) -> Natural -> Bool #rangeSize :: (Natural, Natural) -> Int #unsafeRangeSize :: (Natural, Natural) -> Int # Methodsshift :: Natural -> Int -> Natural #rotate :: Natural -> Int -> Natural #bit :: Int -> Natural #setBit :: Natural -> Int -> Natural #testBit :: Natural -> Int -> Bool #shiftL :: Natural -> Int -> Natural #shiftR :: Natural -> Int -> Natural # # Methods