| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Type.Data.Num.Decimal.Number
- 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.
The wrapper type for decimal type level numbers.
Instances
| Integer x => Integer (Dec x) # | |
| (:/=:) x y => (Dec x) :/=: (Dec y) # | |
| (:==:) x y => (Dec x) :==: (Dec y) # | |
| (:>:) x y => (Dec x) :>: (Dec y) # | |
| (:>=:) x y => (Dec x) :>=: (Dec y) # | |
| (:<=:) x y => (Dec x) :<=: (Dec y) # | |
| (:<:) x y => (Dec x) :<: (Dec y) # | |
| type Repr (Dec x) # | |
| type Log2Ceil (Dec x) # | |
| type Pow2 (Dec x) # | |
| type Div2 (Dec x) # | |
| type Mul2 (Dec x) # | |
| type IsEven (Dec x) # | |
| type Pred (Dec x) # | |
| type Succ (Dec x) # | |
| type IsNatural (Dec x) # | |
| type IsNegative (Dec x) # | |
| type IsZero (Dec x) # | |
| type IsPositive (Dec x) # | |
| type Negate (Dec x) # | |
| type (Dec x) :*: (Dec y) # | |
| type (Dec x) :-: (Dec y) # | |
| type (Dec x) :+: (Dec y) # | |
| type Compare (Dec x) (Dec y) # | |
Instances
| Natural Zero # | |
| Integer Zero # | |
| Zero :==: Zero # | |
| Zero :>=: Zero # | |
| Zero :<=: Zero # | |
| Zero :/=: (Pos y ys) # | |
| Zero :/=: (Neg y ys) # | |
| Zero :>: (Neg y ys) # | |
| Zero :>=: (Neg y ys) # | |
| Zero :<=: (Pos y ys) # | |
| Zero :<: (Pos y ys) # | |
| (Pos x xs) :/=: Zero # | |
| (Neg x xs) :/=: Zero # | |
| (Pos x xs) :>: Zero # | |
| (Pos x xs) :>=: Zero # | |
| (Neg x xs) :<=: Zero # | |
| (Neg x xs) :<: Zero # | |
| type ToUnary Zero # | |
| type Pow2 Zero # | |
| type IsEven Zero # | |
| type Pred Zero # | |
| type Succ Zero # | |
| type Compare Zero Zero # | |
| type Zero :*: _y # | |
| type Zero :+: y # | |
| type Compare Zero (Pos _y _ys) # | |
| type Compare Zero (Neg _y _ys) # | |
| type Compare (Pos _x _xs) Zero # | |
| type Compare (Neg _x _xs) Zero # | |
| type (Pos _x _xs) :*: Zero # | |
| type (Neg _x _xs) :*: Zero # | |
| type (Pos x xs) :+: Zero # | |
| type (Neg x xs) :+: Zero # | |
Instances
| Zero :/=: (Pos y ys) # | |
| Zero :<=: (Pos y ys) # | |
| Zero :<: (Pos y ys) # | |
| (Pos x, Digits xs) => Positive (Pos x xs) # | |
| (Pos x, Digits xs) => Natural (Pos x xs) # | |
| (Pos x, Digits xs) => Integer (Pos x xs) # | |
| (Pos x xs) :/=: Zero # | |
| (Pos x xs) :>: Zero # | |
| (Pos x xs) :>=: Zero # | |
| (~) * (IsEQ (ComparePos x xs y ys)) False => (Pos x xs) :/=: (Pos y ys) # | |
| (Pos x xs) :/=: (Neg y ys) # | |
| (Neg x xs) :/=: (Pos y ys) # | |
| (~) * (ComparePos x xs y ys) EQ => (Pos x xs) :==: (Pos y ys) # | |
| (~) * (ComparePos x xs y ys) GT => (Pos x xs) :>: (Pos y ys) # | |
| (Pos x xs) :>: (Neg y ys) # | |
| (~) * (GreaterPos y ys x xs) False => (Pos x xs) :>=: (Pos y ys) # | |
| (Pos x xs) :>=: (Neg y ys) # | |
| (~) * (GreaterPos x xs y ys) False => (Pos x xs) :<=: (Pos y ys) # | |
| (Neg x xs) :<=: (Pos y ys) # | |
| (~) * (ComparePos x xs y ys) LT => (Pos x xs) :<: (Pos y ys) # | |
| (Neg x xs) :<: (Pos y ys) # | |
| type Compare Zero (Pos _y _ys) # | |
| type ToUnary (Pos x xs) # | |
| type Log2Ceil (Pos x xs) # | |
| type Pow2 (Pos x xs) # | |
| type IsEven (Pos x xs) # | |
| type Pred (Pos x xs) # | |
| type Succ (Pos x xs) # | |
| type Compare (Pos _x _xs) Zero # | |
| type (Pos _x _xs) :*: Zero # | |
| type (Pos x xs) :+: Zero # | |
| type Compare (Pos _x _xs) (Neg _y _ys) # | |
| type Compare (Pos x xs) (Pos y ys) # | |
| type Compare (Neg _x _xs) (Pos _y _ys) # | |
| type (Pos x xs) :*: (Neg y ys) # | |
| type (Pos x xs) :*: (Pos y ys) # | |
| type (Neg x xs) :*: (Pos y ys) # | |
| type (Pos x xs) :+: (Pos y ys) # | |
| type (Pos x xs) :+: (Neg y ys) # | |
| type (Neg x xs) :+: (Pos y ys) # | |
Instances
| Zero :/=: (Neg y ys) # | |
| Zero :>: (Neg y ys) # | |
| Zero :>=: (Neg y ys) # | |
| (Pos x, Digits xs) => Negative (Neg x xs) # | |
| (Pos x, Digits xs) => Integer (Neg x xs) # | |
| (Neg x xs) :/=: Zero # | |
| (Neg x xs) :<=: Zero # | |
| (Neg x xs) :<: Zero # | |
| (Pos x xs) :/=: (Neg y ys) # | |
| (~) * (IsEQ (ComparePos x xs y ys)) False => (Neg x xs) :/=: (Neg y ys) # | |
| (Neg x xs) :/=: (Pos y ys) # | |
| (~) * (ComparePos x xs y ys) EQ => (Neg x xs) :==: (Neg y ys) # | |
| (Pos x xs) :>: (Neg y ys) # | |
| (~) * (ComparePos x xs y ys) LT => (Neg x xs) :>: (Neg y ys) # | |
| (Pos x xs) :>=: (Neg y ys) # | |
| (~) * (GreaterPos x xs y ys) False => (Neg x xs) :>=: (Neg y ys) # | |
| (~) * (GreaterPos y ys x xs) False => (Neg x xs) :<=: (Neg y ys) # | |
| (Neg x xs) :<=: (Pos y ys) # | |
| (~) * (ComparePos x xs y ys) GT => (Neg x xs) :<: (Neg y ys) # | |
| (Neg x xs) :<: (Pos y ys) # | |
| type Compare Zero (Neg _y _ys) # | |
| type IsEven (Neg x xs) # | |
| type Pred (Neg x xs) # | |
| type Succ (Neg x xs) # | |
| type Compare (Neg _x _xs) Zero # | |
| type (Neg _x _xs) :*: Zero # | |
| type (Neg x xs) :+: Zero # | |
| type Compare (Pos _x _xs) (Neg _y _ys) # | |
| type Compare (Neg _x _xs) (Pos _y _ys) # | |
| type Compare (Neg x xs) (Neg y ys) # | |
| type (Pos x xs) :*: (Neg y ys) # | |
| type (Neg x xs) :*: (Pos y ys) # | |
| type (Neg x xs) :*: (Neg y ys) # | |
| type (Pos x xs) :+: (Neg y ys) # | |
| type (Neg x xs) :+: (Neg y ys) # | |
| type (Neg x xs) :+: (Pos y ys) # | |
The terminator type for descending decimal digit lists.
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
reifyIntegral :: Integer -> (forall s. Integer s => Proxy s -> w) -> w #
Minimal complete definition
Instances
| type Compare Zero Zero # | |
| type Compare Zero (Pos _y _ys) # | |
| type Compare Zero (Neg _y _ys) # | |
| type Compare (Pos _x _xs) Zero # | |
| type Compare (Neg _x _xs) Zero # | |
| type Compare (Pos _x _xs) (Neg _y _ys) # | |
| type Compare (Pos x xs) (Pos y ys) # | |
| type Compare (Neg _x _xs) (Pos _y _ys) # | |
| type Compare (Neg x xs) (Neg y ys) # | |
Instances
| Zero :/=: (Pos y ys) # | |
| Zero :/=: (Neg y ys) # | |
| (:/=:) x y => (Dec x) :/=: (Dec y) # | |
| (Pos x xs) :/=: Zero # | |
| (Neg x xs) :/=: Zero # | |
| (~) * (IsEQ (ComparePos x xs y ys)) False => (Pos x xs) :/=: (Pos y ys) # | |
| (Pos x xs) :/=: (Neg y ys) # | |
| (~) * (IsEQ (ComparePos x xs y ys)) False => (Neg x xs) :/=: (Neg y ys) # | |
| (Neg x xs) :/=: (Pos y ys) # | |
type family ToUnaryAcc m n #
Instances
| type ToUnaryAcc m EndDesc # | |
| type ToUnaryAcc m ((:>) x xs) # | |