Basement.Compat.Natural

basement-0.0.15: Foundation scrap box of array & string

Safe Haskell | Safe-Inferred
Language | Haskell2010

Basement.Compat.Natural

# Documentation

data Natural #

#### Instances

Instances details

Data Natural |
Instance details Defined in Data.Data Methods gfoldl :: (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 # toConstr :: Natural -> Constr # dataTypeOf :: Natural -> DataType # 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 :: forall r r'. (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 #
Bits Natural |
Instance details Defined in GHC.Bits Methods (.&.) :: Natural -> Natural -> Natural (.|.) :: Natural -> Natural -> Natural xor :: Natural -> Natural -> Natural complement :: Natural -> Natural shift :: Natural -> Int -> Natural rotate :: Natural -> Int -> Natural zeroBits :: Natural bit :: Int -> Natural setBit :: Natural -> Int -> Natural clearBit :: Natural -> Int -> Natural complementBit :: Natural -> Int -> Natural testBit :: Natural -> Int -> Bool bitSizeMaybe :: Natural -> Maybe Int bitSize :: Natural -> Int isSigned :: Natural -> Bool shiftL :: Natural -> Int -> Natural unsafeShiftL :: Natural -> Int -> Natural shiftR :: Natural -> Int -> Natural unsafeShiftR :: Natural -> Int -> Natural rotateL :: Natural -> Int -> Natural rotateR :: Natural -> Int -> Natural popCount :: Natural -> Int
Enum Natural |
Instance details Defined in GHC.Enum Methods succ :: Natural -> Natural # pred :: Natural -> Natural # toEnum :: Int -> Natural # fromEnum :: Natural -> Int # enumFrom :: Natural -> [Natural] # enumFromThen :: Natural -> Natural -> [Natural] # enumFromTo :: Natural -> Natural -> [Natural] # enumFromThenTo :: Natural -> Natural -> Natural -> [Natural] #
Num Natural |
Instance details Defined in GHC.Num Methods (+) :: Natural -> Natural -> Natural (-) :: Natural -> Natural -> Natural (*) :: Natural -> Natural -> Natural negate :: Natural -> Natural abs :: Natural -> Natural signum :: Natural -> Natural fromInteger :: Integer -> Natural
Read Natural |
Instance details Defined in GHC.Read Methods readsPrec :: Int -> ReadS Natural readList :: ReadS [Natural] readPrec :: ReadPrec Natural readListPrec :: ReadPrec [Natural]
Integral Natural |
Instance details Defined in GHC.Real Methods quot :: Natural -> Natural -> Natural rem :: Natural -> Natural -> Natural div :: Natural -> Natural -> Natural mod :: Natural -> Natural -> Natural quotRem :: Natural -> Natural -> (Natural, Natural) divMod :: Natural -> Natural -> (Natural, Natural) toInteger :: Natural -> Integer
Real Natural |
Instance details Defined in GHC.Real Methods toRational :: Natural -> Rational
Show Natural |
Instance details Defined in GHC.Show Methods showsPrec :: Int -> Natural -> ShowS # show :: Natural -> String # showList :: [Natural] -> ShowS #
Integral Natural # |
Instance details Defined in Basement.Compat.NumLiteral Methods fromInteger :: Integer -> Natural #
NormalForm Natural # |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Natural -> () #
Additive Natural # |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Natural # (+) :: Natural -> Natural -> Natural # scale :: IsNatural n => n -> Natural -> Natural #
IDivisible Natural # |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Natural -> Natural -> Natural # mod :: Natural -> Natural -> Natural # divMod :: Natural -> Natural -> (Natural, Natural) #
Multiplicative Natural # |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Natural # (*) :: Natural -> Natural -> Natural # (^) :: (IsNatural n, Enum n, IDivisible n) => Natural -> n -> Natural #
IsIntegral Natural # |
Instance details Defined in Basement.Numerical.Number Methods toInteger :: Natural -> Integer #
IsNatural Natural # |
Instance details Defined in Basement.Numerical.Number Methods toNatural :: Natural -> Natural #
Subtractive Natural # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Natural # Methods (-) :: Natural -> Natural -> Difference Natural #
Eq Natural |
Instance details Defined in GHC.Num.Natural Methods (==) :: Natural -> Natural -> Bool # (/=) :: Natural -> Natural -> Bool #
Ord Natural |
Instance details Defined in GHC.Num.Natural Methods compare :: Natural -> Natural -> Ordering # (<) :: Natural -> Natural -> Bool # (<=) :: Natural -> Natural -> Bool # (>) :: Natural -> Natural -> Bool # (>=) :: Natural -> Natural -> Bool # max :: Natural -> Natural -> Natural # min :: Natural -> Natural -> Natural #
IsNatural n => From n Natural # |
Instance details Defined in Basement.From Methods from :: n -> Natural #
IntegralDownsize Integer Natural # |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Integer -> Natural # integralDownsizeCheck :: Integer -> Maybe Natural #
IntegralDownsize Natural Word16 # |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word16 # integralDownsizeCheck :: Natural -> Maybe Word16 #
IntegralDownsize Natural Word32 # |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word32 # integralDownsizeCheck :: Natural -> Maybe Word32 #
IntegralDownsize Natural Word64 # |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word64 # integralDownsizeCheck :: Natural -> Maybe Word64 #
IntegralDownsize Natural Word8 # |
Instance details Defined in Basement.IntegralConv Methods integralDownsize :: Natural -> Word8 # integralDownsizeCheck :: Natural -> Maybe Word8 #
IsNatural a => IntegralUpsize a Natural # |
Instance details Defined in Basement.IntegralConv Methods integralUpsize :: a -> Natural #
type Difference Natural # |
Instance details Defined in Basement.Numerical.Subtractive type Difference Natural = Maybe Natural
type Compare (a :: Natural) (b :: Natural) |
Instance details Defined in Data.Type.Ord type Compare (a :: Natural) (b :: Natural) = CmpNat a b

integerToNatural :: Integer -> Natural #

naturalToInteger :: Natural -> Integer #