Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
data Sing :: SNat -> * where Source #
Instances
SingInteger (Sing x) => SingInteger (Sing ('Su x)) Source # | |
Defined in Math.Number.TypeRational | |
SingInteger (Sing 'Ze) Source # | |
Defined in Math.Number.TypeRational |
class SingInteger n where Source #
singToInteger :: n -> Integer Source #
Instances
(SingInteger (Sing n), SingPrime p) => SingInteger (PrimePowerSing ('PrimePower p n)) Source # | |
Defined in Math.Number.TypeRational singToInteger :: PrimePowerSing ('PrimePower p n) -> Integer Source # | |
SingPrime n => SingInteger (PrimeSing n) Source # | |
Defined in Math.Number.TypeRational singToInteger :: PrimeSing n -> Integer Source # | |
SingInteger (Sing x) => SingInteger (Sing ('Su x)) Source # | |
Defined in Math.Number.TypeRational | |
SingInteger (Sing 'Ze) Source # | |
Defined in Math.Number.TypeRational |
class SingRational r where Source #
singToRational :: r -> Rational Source #
class SingPrime (n :: Prime) where Source #
singToPrimeIndex :: PrimeSing n -> Integer Source #
Instances
SingPrime 'PrTwo Source # | |
Defined in Math.Number.TypeRational | |
SingPrime p => SingPrime ('NextPrimeAfter p) Source # | |
Defined in Math.Number.TypeRational singToPrimeIndex :: PrimeSing ('NextPrimeAfter p) -> Integer Source # |
data PrimeSing :: Prime -> * where Source #
Instances
SingPrime n => SingInteger (PrimeSing n) Source # | |
Defined in Math.Number.TypeRational singToInteger :: PrimeSing n -> Integer Source # |
data PrimePowerSing :: PrimePower -> * where Source #
SPrimePower :: PrimeSing p -> Sing n -> PrimePowerSing ('PrimePower p n) |
Instances
(SingInteger (Sing n), SingPrime p) => SingInteger (PrimePowerSing ('PrimePower p n)) Source # | |
Defined in Math.Number.TypeRational singToInteger :: PrimePowerSing ('PrimePower p n) -> Integer Source # |
data PrimePower Source #
type family InvertPrime (a :: SRat) = (c :: SRat) | c -> a where ... Source #
InvertPrime 'PrOne = 'PrOne | |
InvertPrime ('PrTimes ('PrimePower p n) r) = 'PrTimes ('PrimePower p ('SNegate n)) (InvertPrime r) |
type family ShiftPrime (a :: SRat) = (c :: SRat) | c -> a where ... Source #
ShiftPrime 'PrOne = 'PrTimes PPTwo 'PrOne | |
ShiftPrime ('PrTimes ('PrimePower p n) r) = 'PrTimes ('PrimePower ('NextPrimeAfter p) n) r |
type family RatMul (a :: SRat) (b :: SRat) :: SRat where ... Source #
RatMul ('PrTimes ('PrimePower 'PrTwo n) r) ('PrTimes ('PrimePower 'PrTwo m) r') = 'PrTimes ('PrimePower 'PrTwo (SPlus n m)) (RatMul r r') | |
RatMul ('PrTimes ('PrimePower ('NextPrimeAfter p) n) r) ('PrTimes ('PrimePower ('NextPrimeAfter q) n') r') = ShiftPrime (RatMul ('PrTimes ('PrimePower p n) r) ('PrTimes ('PrimePower q n') r')) | |
RatMul ('PrTimes ('PrimePower 'PrTwo n) r) ('PrTimes ('PrimePower ('NextPrimeAfter p) m) r') = 'PrTimes ('PrimePower 'PrTwo n) (RatMul r ('PrTimes ('PrimePower ('NextPrimeAfter p) m) r')) | |
RatMul ('PrTimes ('PrimePower ('NextPrimeAfter p) n) r) ('PrTimes ('PrimePower 'PrTwo m) r') = 'PrTimes ('PrimePower 'PrTwo m) (RatMul ('PrTimes ('PrimePower ('NextPrimeAfter p) n) r) r') | |
RatMul 'PrOne ('PrTimes a b) = 'PrTimes a b | |
RatMul ('PrTimes a b) 'PrOne = 'PrTimes a b | |
RatMul 'PrOne 'PrOne = 'PrOne |
type family RatDiv (a :: SRat) (b :: SRat) :: SRat where ... Source #
RatDiv ('PrTimes ('PrimePower 'PrTwo n) r) ('PrTimes ('PrimePower 'PrTwo m) r') = 'PrTimes ('PrimePower 'PrTwo (SMinus n m)) (RatDiv r r') | |
RatDiv ('PrTimes ('PrimePower ('NextPrimeAfter p) n) r) ('PrTimes ('PrimePower ('NextPrimeAfter q) n') r') = ShiftPrime (RatDiv ('PrTimes ('PrimePower p n) r) ('PrTimes ('PrimePower q n') r')) | |
RatDiv ('PrTimes ('PrimePower 'PrTwo n) r) ('PrTimes ('PrimePower ('NextPrimeAfter p) m) r') = 'PrTimes ('PrimePower 'PrTwo n) (RatDiv r ('PrTimes ('PrimePower ('NextPrimeAfter p) m) r')) | |
RatDiv ('PrTimes ('PrimePower ('NextPrimeAfter p) n) r) ('PrTimes ('PrimePower 'PrTwo m) r') = 'PrTimes ('PrimePower 'PrTwo m) (RatDiv ('PrTimes ('PrimePower ('NextPrimeAfter p) n) r) r') | |
RatDiv 'PrOne ('PrTimes a b) = InvertPrime ('PrTimes a b) | |
RatDiv ('PrTimes a b) 'PrOne = 'PrTimes a b | |
RatDiv 'PrOne 'PrOne = 'PrOne |
type PrThree = 'NextPrimeAfter 'PrTwo Source #
type PrFive = 'NextPrimeAfter PrThree Source #
type PrSeven = 'NextPrimeAfter PrFive Source #
type SMinusThree = 'SNegate SThree Source #
type SMinusFour = 'SNegate SFour Source #