| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Type.Data.Num.Decimal.Number
Synopsis
- data Decimal
- decimal :: Proxy n -> Proxy (Dec n)
- data Dec x
- data Zero
- data Pos x xs
- data Neg x xs
- data EndAsc
- data ds :< d
- data EndDesc
- data d :> ds
- newtype Singleton x = Singleton Integer
- singleton :: Integer x => Singleton x
- singletonFromProxy :: Integer n => Proxy n -> Singleton n
- integerFromSingleton :: Integer n => Singleton n -> Integer
- integralFromSingleton :: (Integer n, Num a) => Singleton n -> a
- integralFromProxy :: (Integer n, Num a) => Proxy n -> a
- class Integer n where
- class Integer n => Natural n where
- class Natural n => Positive n where
- class Integer n => Negative n where
- reifyIntegral :: Integer -> (forall s. Integer s => Proxy s -> w) -> w
- reifyNatural :: Integer -> (forall s. Natural s => Proxy s -> a) -> Maybe a
- reifyPositive :: Integer -> (forall s. Positive s => Proxy s -> a) -> Maybe a
- reifyNegative :: Integer -> (forall s. Negative s => Proxy s -> a) -> Maybe a
- reifyPos :: Integer -> (forall x xs. (Pos x, Digits xs) => Proxy (Pos x xs) -> a) -> Maybe a
- reifyNeg :: Integer -> (forall x xs. (Pos x, Digits xs) => Proxy (Neg x xs) -> a) -> Maybe a
- class Digits xs where
- type family x :+: y
- type (:-:) x y = x :+: Negate y
- type family x :*: y
- type family Pred x
- type family Succ x
- type family Compare x y
- type family IsEven x
- type family Pow2 x
- type family Log2Ceil x
- class x :<: y
- class x :<=: y
- class x :==: y
- class x :>: y
- class x :>=: y
- class x :/=: y
- type family FromUnary n
- type family ToUnary n
- type family ToUnaryAcc m n
- type UnaryAcc m x = ToUnary x :+: (m :*: U10)
Documentation
Representation name for decimal type level numbers.
Instances
| Representation Decimal # | |
Defined in Type.Data.Num.Decimal.Number | |
| type One Decimal # | |
Defined in Type.Data.Num.Decimal.Number | |
The wrapper type for decimal type level numbers.
Instances
Instances
Instances
Instances
The terminator type for ascending decimal digit lists.
The terminator type for descending decimal digit lists.
Instances
| Show EndDesc # | |
| Digits EndDesc # | |
Defined in Type.Data.Num.Decimal.Number | |
| type ToUnaryAcc m EndDesc # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| (C xh, Digits xl) => Digits (xh :> xl) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type ToUnaryAcc m (x :> xs) # | |
Defined in Type.Data.Num.Decimal.Number | |
singletonFromProxy :: Integer n => Proxy n -> Singleton n #
integerFromSingleton :: Integer n => Singleton n -> Integer #
integralFromSingleton :: (Integer n, Num a) => Singleton n -> a #
integralFromProxy :: (Integer n, Num a) => Proxy n -> a #
Minimal complete definition
Methods
switch :: f Zero -> (forall x xs. (Pos x, Digits xs) => f (Neg x xs)) -> (forall x xs. (Pos x, Digits xs) => f (Pos x xs)) -> f n #
class Integer n => Natural n where #
Minimal complete definition
reifyIntegral :: Integer -> (forall s. Integer s => Proxy s -> w) -> w #
Minimal complete definition
Instances
| Digits EndDesc # | |
Defined in Type.Data.Num.Decimal.Number | |
| (C xh, Digits xl) => Digits (xh :> xl) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| type Zero :+: y # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Pos x xs) :+: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Neg x xs) :+: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Pos x xs) :+: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Pos x xs) :+: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Neg x xs) :+: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Neg x xs) :+: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| type Zero :*: _y # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Pos _x _xs) :*: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Neg _x _xs) :*: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Pos x xs) :*: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Pos x xs) :*: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Neg x xs) :*: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type (Neg x xs) :*: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| type Compare Zero Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| type Compare Zero (Pos _y _ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type Compare Zero (Neg _y _ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type Compare (Pos _x _xs) Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| type Compare (Neg _x _xs) Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| type Compare (Pos _x _xs) (Neg _y _ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type Compare (Pos x xs) (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type Compare (Neg _x _xs) (Pos _y _ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| type Compare (Neg x xs) (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| Zero :<: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| x :<: y => (Dec x) :<: (Dec y) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Neg x xs) :<: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| ComparePos x xs y ys ~ LT => (Pos x xs) :<: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| ComparePos x xs y ys ~ GT => (Neg x xs) :<: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Neg x xs) :<: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| Zero :<=: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| Zero :<=: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| x :<=: y => (Dec x) :<=: (Dec y) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Neg x xs) :<=: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| GreaterPos x xs y ys ~ False => (Pos x xs) :<=: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| GreaterPos y ys x xs ~ False => (Neg x xs) :<=: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Neg x xs) :<=: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| Zero :==: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| x :==: y => (Dec x) :==: (Dec y) # | |
Defined in Type.Data.Num.Decimal.Number | |
| ComparePos x xs y ys ~ EQ => (Pos x xs) :==: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| ComparePos x xs y ys ~ EQ => (Neg x xs) :==: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| Zero :>: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| x :>: y => (Dec x) :>: (Dec y) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Pos x xs) :>: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| ComparePos x xs y ys ~ GT => (Pos x xs) :>: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Pos x xs) :>: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| ComparePos x xs y ys ~ LT => (Neg x xs) :>: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| Zero :>=: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| Zero :>=: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| x :>=: y => (Dec x) :>=: (Dec y) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Pos x xs) :>=: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| GreaterPos y ys x xs ~ False => (Pos x xs) :>=: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Pos x xs) :>=: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| GreaterPos x xs y ys ~ False => (Neg x xs) :>=: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| Zero :/=: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| Zero :/=: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| x :/=: y => (Dec x) :/=: (Dec y) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Pos x xs) :/=: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Neg x xs) :/=: Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| IsEQ (ComparePos x xs y ys) ~ False => (Pos x xs) :/=: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Pos x xs) :/=: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| IsEQ (ComparePos x xs y ys) ~ False => (Neg x xs) :/=: (Neg y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
| (Neg x xs) :/=: (Pos y ys) # | |
Defined in Type.Data.Num.Decimal.Number | |
Instances
| type ToUnary Zero # | |
Defined in Type.Data.Num.Decimal.Number | |
| type ToUnary (Pos x xs) # | |
Defined in Type.Data.Num.Decimal.Number | |
type family ToUnaryAcc m n #
Instances
| type ToUnaryAcc m EndDesc # | |
Defined in Type.Data.Num.Decimal.Number | |
| type ToUnaryAcc m (x :> xs) # | |
Defined in Type.Data.Num.Decimal.Number | |