Module

Data.Typelevel.Num.Ops

#Succ

class (Nat x, Pos y) <= Succ x y | x -> y, y -> x

Instances

#SuccP

class SuccP :: forall k1 k2 k3 k4 k5. k1 -> k2 -> k3 -> k4 -> k5 -> Constraintclass SuccP xh xl yh yl yz | xh xl -> yh yl yz, yh yl yz -> xh xl

Instances

#succ

succ :: forall x y. Succ x y => x -> y

#Pred

class Pred :: forall k. Type -> k -> Constraintclass (Pos x) <= Pred x y | x -> y, y -> x

Instances

#pred

pred :: forall x y. Pred x y => x -> y

#Failure

class Failure :: forall k. k -> Constraintclass Failure t 

#PredecessorOfZeroError

#AddP

class AddP :: forall k1 k2. Type -> k1 -> k2 -> Constraintclass (Nat x) <= AddP x y z | x y -> z, z x -> y

Instances

#Add

class Add :: forall k. Type -> Type -> k -> Constraintclass (AddP x y z, AddP y x z) <= Add x y z | x y -> z, z x -> y, z y -> x

Instances

#add

add :: forall x y z. Add x y z => x -> y -> z

#(+)

Operator alias for Data.Typelevel.Num.Ops.add (left-associative / precedence 6)

#Sub

class Sub :: forall k1 k2 k3. k1 -> k2 -> k3 -> Constraintclass Sub x y z | x y -> z, z x -> y, z y -> x

Instances

#sub

sub :: forall x y z. Sub x y z => x -> y -> z

#(-)

Operator alias for Data.Typelevel.Num.Ops.sub (left-associative / precedence 6)

#Mul

class Mul :: forall k. Type -> Type -> k -> Constraintclass (Nat x, Nat y) <= Mul x y z | x y -> z

Instances

#mul

mul :: forall x y z. Mul x y z => x -> y -> z

#(*)

Operator alias for Data.Typelevel.Num.Ops.mul (left-associative / precedence 7)

#DivMod

class DivMod :: forall k1 k2. Type -> Type -> k1 -> k2 -> Constraintclass (Nat x, Pos y) <= DivMod x y q r | x y -> q r

Instances

#DivModP

class DivModP :: forall k1 k2 k3. Type -> Type -> k1 -> k2 -> k3 -> Constraintclass (Nat x, Pos y) <= DivModP x y q r cmp | x y cmp -> q r, q r cmp y -> x, q r cmp x -> y

Instances

#divMod

divMod :: forall x y q r. DivMod x y q r => x -> y -> Tuple q r

#Div

class Div :: forall k1 k2 k3. k1 -> k2 -> k3 -> Constraintclass Div x y z | x y -> z, x z -> y, y z -> x

Instances

#div

div :: forall x y z. Div x y z => x -> y -> z

#Mod

class Mod :: forall k1 k2 k3. k1 -> k2 -> k3 -> Constraintclass Mod x y r | x y -> r

Instances

#mod

mod :: forall x y r. Mod x y r => x -> y -> r

#Mul10

class Mul10 :: forall k. k -> Type -> Constraintclass (Nat q) <= Mul10 x q | x -> q, q -> x

Instances

#mul10

mul10 :: forall x q. Mul10 x q => x -> q

#DivMod10

class DivMod10 :: forall k. Type -> Type -> k -> Constraintclass (Nat i, Nat x) <= DivMod10 x i l | i l -> x, x -> i l

Instances

#divMod10

divMod10 :: forall x r q. DivMod10 x q r => x -> Tuple q r

#Div10

class Div10 :: forall k. Type -> k -> Constraintclass (Nat x) <= Div10 x q | x -> q, q -> x

Instances

#div10

div10 :: forall x q. Div10 x q => x -> q

#IsDivBy

class IsDivBy :: forall k. Type -> k -> Constraintclass (Pos d) <= IsDivBy d x 

Instances

#isDivBy

isDivBy :: forall d x. IsDivBy d x => d -> x

#Trich

class Trich :: forall k. Type -> Type -> k -> Constraintclass (Nat x, Nat y) <= Trich x y r | x y -> r

Instances

#trich

trich :: forall x y r. Trich x y r => x -> y -> r

#CS

class CS :: forall k1 k2 k3. k1 -> k2 -> k3 -> Constraintclass CS r1 r2 r3 | r1 r2 -> r3

Instances

#Eq

class Eq :: forall k1 k2. k1 -> k2 -> Constraintclass Eq x y 

Instances

#eq

eq :: forall x y. Eq x y => x -> y -> Unit

#Gt

class Gt :: forall k1 k2. k1 -> k2 -> Constraintclass Gt x y 

Instances

#gt

gt :: forall x y. Gt x y => x -> y -> Unit

#Lt

class Lt :: forall k1 k2. k1 -> k2 -> Constraintclass Lt x y 

Instances

#lt

lt :: forall x y. Lt x y => x -> y -> Unit

#GtEq

class GtEq :: forall k1 k2. k1 -> k2 -> Constraintclass GtEq x y 

Instances

#gteq

gteq :: forall x y. GtEq x y => x -> y -> Unit

#LtEq

class LtEq :: forall k1 k2. k1 -> k2 -> Constraintclass LtEq x y 

Instances

#lteq

lteq :: forall x y. LtEq x y => x -> y -> Unit

#(==)

Operator alias for Data.Typelevel.Num.Ops.eq (left-associative / precedence 4)

#(>)

Operator alias for Data.Typelevel.Num.Ops.gt (left-associative / precedence 4)

#(<)

Operator alias for Data.Typelevel.Num.Ops.lt (left-associative / precedence 4)

#(>=)

Operator alias for Data.Typelevel.Num.Ops.gteq (left-associative / precedence 4)

#(<=)

Operator alias for Data.Typelevel.Num.Ops.lteq (left-associative / precedence 4)

#MaxP

class MaxP :: forall k1 k2 k3 k4. k1 -> k2 -> k3 -> k4 -> Constraintclass MaxP x y b r | x y b -> r

Instances

#Max

class Max :: forall k1 k2 k3. k1 -> k2 -> k3 -> Constraintclass Max x y z | x y -> z

Instances

#max

max :: forall x y z. Max x y z => x -> y -> z

#Min

class Min :: forall k1 k2 k3. k1 -> k2 -> k3 -> Constraintclass Min x y z | x y -> z

Instances

#min

min :: forall x y z. Min x y z => x -> y -> z

#GCD

class (Nat x, Nat y, Nat gcd) <= GCD x y gcd | x y -> gcd

Instances

#GCDP

class GCDP :: forall k1 k2. Type -> Type -> k1 -> k2 -> Type -> Constraintclass (Nat x, Nat y, Nat gcd) <= GCDP x y yz cmp gcd | x y yz cmp -> gcd

Instances

#gcd

gcd :: forall x y z. GCD x y z => x -> y -> z

Modules