ContentsIndex
Org.Org.Semantic.HBase.TypeCalc.IntegerType
Synopsis
data NegativeSucc n
class IntegerType a where
getIntegerTypeValue :: Type a -> Integer
type MinusOne = NegativeSucc Zero
type MinusTwo = NegativeSucc One
type MinusThree = NegativeSucc Two
type MinusFour = NegativeSucc Three
type MinusFive = NegativeSucc Four
type MinusSix = NegativeSucc Five
type MinusSeven = NegativeSucc Six
type MinusEight = NegativeSucc Seven
type MinusNine = NegativeSucc Eight
type MinusTen = NegativeSucc Nine
class Negate a b | a -> b, b -> a
class Absolute a abs sign | a -> abs sign, abs sign -> a
class GCD a b gcd | a b -> gcd
Documentation
data NegativeSucc n
represents -(n+1)
Instances
NaturalType a => IntegerType (NegativeSucc a)
Negate (Succ a) (NegativeSucc a)
Negate (NegativeSucc a) (Succ a)
AddOne (NegativeSucc (Succ a)) (NegativeSucc a)
AddOne (NegativeSucc (Succ a)) (NegativeSucc a)
AddOne (NegativeSucc Zero) Zero
IsAtLeast Zero (NegativeSucc b) True
IsAtLeast (Succ a) (NegativeSucc b) True
IsAtLeast (NegativeSucc a) Zero False
IsAtLeast (NegativeSucc a) (Succ b) False
IsAtLeast b a c => IsAtLeast (NegativeSucc a) (NegativeSucc b) c
IsAtLeast b a c => IsAtLeast (NegativeSucc a) (NegativeSucc b) c
(IsEven a e, Not e ne) => IsEven (NegativeSucc a) ne
(Add (NegativeSucc a) b ab, AddOne abm1 ab) => Add (NegativeSucc (Succ a)) b abm1
AddOne bm1 b => Add (NegativeSucc Zero) b bm1
(Multiply (Succ a) b ab, Negate ab nab) => Multiply (NegativeSucc a) b nab
Absolute (NegativeSucc a) (Succ a) MinusOne
(Divide a (Succ b) c, Negate c nc) => Divide a (NegativeSucc b) nc
Divide (Succ a) (Succ b) (Succ c) => Divide (NegativeSucc a) (Succ b) (NegativeSucc c)
Divide (Succ a) (Succ b) (Succ c) => Divide (NegativeSucc a) (Succ b) (NegativeSucc c)
class IntegerType a where
Metatype
Methods
getIntegerTypeValue :: Type a -> Integer
Instances
IntegerType Zero
NaturalType a => IntegerType (Succ a)
NaturalType a => IntegerType (NegativeSucc a)
type MinusOne = NegativeSucc Zero
type MinusTwo = NegativeSucc One
type MinusThree = NegativeSucc Two
type MinusFour = NegativeSucc Three
type MinusFive = NegativeSucc Four
type MinusSix = NegativeSucc Five
type MinusSeven = NegativeSucc Six
type MinusEight = NegativeSucc Seven
type MinusNine = NegativeSucc Eight
type MinusTen = NegativeSucc Nine
class Negate a b | a -> b, b -> a
Instances
Negate Zero Zero
Negate (Succ a) (NegativeSucc a)
Negate (NegativeSucc a) (Succ a)
class Absolute a abs sign | a -> abs sign, abs sign -> a
Instances
Absolute Zero Zero Zero
Absolute (Succ a) (Succ a) One
Absolute (NegativeSucc a) (Succ a) MinusOne
class GCD a b gcd | a b -> gcd
Instances
GCD Zero b b
GCD (Succ a) Zero (Succ a)
(Add b amb a, Absolute amb diff sign, IsAtLeast Zero amb abigger, Pick abigger b a smaller, GCD (Succ smaller) diff gcd) => GCD (Succ a) (Succ b) gcd
Produced by Haddock version 0.6