| 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
- switchDigits :: f EndDesc -> (forall xh xl. (C xh, Digits xl) => f (xh :> xl)) -> f xs
- 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) Source | |
| (:/=:) x y => (Dec x) :/=: (Dec y) Source | |
| (:==:) x y => (Dec x) :==: (Dec y) Source | |
| (:>:) x y => (Dec x) :>: (Dec y) Source | |
| (:>=:) x y => (Dec x) :>=: (Dec y) Source | |
| (:<=:) x y => (Dec x) :<=: (Dec y) Source | |
| (:<:) x y => (Dec x) :<: (Dec y) Source | |
| type Repr (Dec x) = Decimal Source | |
| type Log2Ceil (Dec x) = Dec (Log2Ceil x) Source | |
| type Pow2 (Dec x) = Dec (Pow2 x) Source | |
| type Div2 (Dec x) Source | |
| type Mul2 (Dec x) = Dec ((:+:) x x) Source | |
| type IsEven (Dec x) = IsEven x Source | |
| type Pred (Dec x) = Dec (Pred x) Source | |
| type Succ (Dec x) = Dec (Succ x) Source | |
| type IsNatural (Dec x) Source | |
| type IsNegative (Dec x) Source | |
| type IsZero (Dec x) Source | |
| type IsPositive (Dec x) Source | |
| type Negate (Dec x) Source | |
| type Compare (Dec x) (Dec y) = Compare x y Source | |
| type (Dec x) :*: (Dec y) = Dec ((:*:) x y) Source | |
| type (Dec x) :-: (Dec y) = Dec ((:-:) x y) Source | |
| type (Dec x) :+: (Dec y) = Dec ((:+:) x y) Source |
Instances
Instances
| Zero :/=: (Pos y ys) Source | |
| Zero :<=: (Pos y ys) Source | |
| Zero :<: (Pos y ys) Source | |
| (Pos x, Digits xs) => Positive (Pos x xs) Source | |
| (Pos x, Digits xs) => Natural (Pos x xs) Source | |
| (Pos x, Digits xs) => Integer (Pos x xs) Source | |
| (Pos x xs) :/=: Zero Source | |
| (Pos x xs) :>: Zero Source | |
| (Pos x xs) :>=: Zero Source | |
| (~) * (IsEQ (ComparePos x xs y ys)) False => (Pos x xs) :/=: (Pos y ys) Source | |
| (Pos x xs) :/=: (Neg y ys) Source | |
| (Neg x xs) :/=: (Pos y ys) Source | |
| (~) * (ComparePos x xs y ys) EQ => (Pos x xs) :==: (Pos y ys) Source | |
| (~) * (ComparePos x xs y ys) GT => (Pos x xs) :>: (Pos y ys) Source | |
| (Pos x xs) :>: (Neg y ys) Source | |
| (~) * (GreaterPos y ys x xs) False => (Pos x xs) :>=: (Pos y ys) Source | |
| (Pos x xs) :>=: (Neg y ys) Source | |
| (~) * (GreaterPos x xs y ys) False => (Pos x xs) :<=: (Pos y ys) Source | |
| (Neg x xs) :<=: (Pos y ys) Source | |
| (~) * (ComparePos x xs y ys) LT => (Pos x xs) :<: (Pos y ys) Source | |
| (Neg x xs) :<: (Pos y ys) Source | |
| type Compare Zero (Pos y ys) = LT Source | |
| type ToUnary (Pos x xs) = ToUnaryAcc (ToUnary x) xs Source | |
| type Log2Ceil (Pos x xs) Source | |
| type Pow2 (Pos x xs) Source | |
| type IsEven (Pos x xs) Source | |
| type Pred (Pos x xs) Source | |
| type Succ (Pos x xs) Source | |
| type Compare (Pos x xs) Zero = GT Source | |
| type (Pos x xs) :*: Zero = Zero Source | |
| type (Pos x xs) :+: Zero = Pos x xs Source | |
| type Compare (Pos x xs) (Neg y ys) = GT Source | |
| type Compare (Pos x xs) (Pos y ys) Source | |
| type Compare (Neg x xs) (Pos y ys) = LT Source | |
| type (Pos x xs) :*: (Neg y ys) Source | |
| type (Pos x xs) :*: (Pos y ys) Source | |
| type (Neg x xs) :*: (Pos y ys) Source | |
| type (Pos x xs) :+: (Neg y ys) Source | |
| type (Pos x xs) :+: (Pos y ys) Source | |
| type (Neg x xs) :+: (Pos y ys) Source |
Instances
| Zero :/=: (Neg y ys) Source | |
| Zero :>: (Neg y ys) Source | |
| Zero :>=: (Neg y ys) Source | |
| (Pos x, Digits xs) => Negative (Neg x xs) Source | |
| (Pos x, Digits xs) => Integer (Neg x xs) Source | |
| (Neg x xs) :/=: Zero Source | |
| (Neg x xs) :<=: Zero Source | |
| (Neg x xs) :<: Zero Source | |
| (Pos x xs) :/=: (Neg y ys) Source | |
| (~) * (IsEQ (ComparePos x xs y ys)) False => (Neg x xs) :/=: (Neg y ys) Source | |
| (Neg x xs) :/=: (Pos y ys) Source | |
| (~) * (ComparePos x xs y ys) EQ => (Neg x xs) :==: (Neg y ys) Source | |
| (Pos x xs) :>: (Neg y ys) Source | |
| (~) * (ComparePos x xs y ys) LT => (Neg x xs) :>: (Neg y ys) Source | |
| (Pos x xs) :>=: (Neg y ys) Source | |
| (~) * (GreaterPos x xs y ys) False => (Neg x xs) :>=: (Neg y ys) Source | |
| (~) * (GreaterPos y ys x xs) False => (Neg x xs) :<=: (Neg y ys) Source | |
| (Neg x xs) :<=: (Pos y ys) Source | |
| (~) * (ComparePos x xs y ys) GT => (Neg x xs) :<: (Neg y ys) Source | |
| (Neg x xs) :<: (Pos y ys) Source | |
| type Compare Zero (Neg y ys) = GT Source | |
| type IsEven (Neg x xs) Source | |
| type Pred (Neg x xs) Source | |
| type Succ (Neg x xs) Source | |
| type Compare (Neg x xs) Zero = LT Source | |
| type (Neg x xs) :*: Zero = Zero Source | |
| type (Neg x xs) :+: Zero = Neg x xs Source | |
| type Compare (Pos x xs) (Neg y ys) = GT Source | |
| type Compare (Neg x xs) (Pos y ys) = LT Source | |
| type Compare (Neg x xs) (Neg y ys) Source | |
| type (Pos x xs) :*: (Neg y ys) Source | |
| type (Neg x xs) :*: (Pos y ys) Source | |
| type (Neg x xs) :*: (Neg y ys) Source | |
| type (Pos x xs) :+: (Neg y ys) Source | |
| type (Neg x xs) :+: (Pos y ys) Source | |
| type (Neg x xs) :+: (Neg y ys) Source |
The terminator type for descending decimal digit lists.
Instances
| (C xh, Digits xl) => Digits ((:>) xh xl) Source | |
| type ToUnaryAcc m ((:>) x xs) = ToUnaryAcc (UnaryAcc m x) xs Source |
singletonFromProxy :: Integer n => Proxy n -> Singleton n Source
integerFromSingleton :: Integer n => Singleton n -> Integer Source
integralFromSingleton :: (Integer n, Num a) => Singleton n -> a Source
integralFromProxy :: (Integer n, Num a) => Proxy n -> a Source
reifyIntegral :: Integer -> (forall s. Integer s => Proxy s -> w) -> w Source
type family Compare x y Source
Instances
| type Compare Zero Zero = EQ Source | |
| type Compare Zero (Pos y ys) = LT Source | |
| type Compare Zero (Neg y ys) = GT Source | |
| type Compare (Pos x xs) Zero = GT Source | |
| type Compare (Neg x xs) Zero = LT Source | |
| type Compare (Pos x xs) (Neg y ys) = GT Source | |
| type Compare (Pos x xs) (Pos y ys) Source | |
| type Compare (Neg x xs) (Pos y ys) = LT Source | |
| type Compare (Neg x xs) (Neg y ys) Source |
Instances
Instances
Instances
| Zero :/=: (Pos y ys) Source | |
| Zero :/=: (Neg y ys) Source | |
| (:/=:) x y => (Dec x) :/=: (Dec y) Source | |
| (Pos x xs) :/=: Zero Source | |
| (Neg x xs) :/=: Zero Source | |
| (~) * (IsEQ (ComparePos x xs y ys)) False => (Pos x xs) :/=: (Pos y ys) Source | |
| (Pos x xs) :/=: (Neg y ys) Source | |
| (~) * (IsEQ (ComparePos x xs y ys)) False => (Neg x xs) :/=: (Neg y ys) Source | |
| (Neg x xs) :/=: (Pos y ys) Source |
type family ToUnaryAcc m n Source
Instances
| type ToUnaryAcc m EndDesc = m Source | |
| type ToUnaryAcc m ((:>) x xs) = ToUnaryAcc (UnaryAcc m x) xs Source |