Module

Data.Typelevel.Num.Ops

Package
purescript-typelevel
Repository
bodil/purescript-typelevel

#Succ Source

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

Instances

#SuccP Source

class SuccP xh xl yh yl yz | xh xl -> yh yl yz, yh yl yz -> xh xl

Instances

#succ Source

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

#Pred Source

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

Instances

#pred Source

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

#Failure Source

class Failure t 

#PredecessorOfZeroError Source

#AddP Source

class (Nat x) <= AddP x y z | x y -> z, z x -> y

Instances

#Add Source

class (AddP x y z, AddP y x z) <= Add x y z | x y -> z, z x -> y, z y -> x

Instances

#add Source

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

#(+) Source

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

#Sub Source

class Sub x y z | x y -> z, z x -> y, z y -> x

Instances

#sub Source

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

#(-) Source

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

#Mul Source

class (Nat x, Nat y) <= Mul x y z | x y -> z

Instances

#mul Source

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

#(*) Source

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

#DivMod Source

class (Nat x, Pos y) <= DivMod x y q r | x y -> q r

Instances

#DivModP Source

class (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 Source

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

#Div Source

class Div x y z | x y -> z, x z -> y, y z -> x

Instances

#div Source

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

#Mod Source

class Mod x y r | x y -> r

Instances

#mod Source

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

#Mul10 Source

class (Nat q) <= Mul10 x q | x -> q, q -> x

Instances

#mul10 Source

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

#DivMod10 Source

class (Nat i, Nat x) <= DivMod10 x i l | i l -> x, x -> i l

Instances

#divMod10 Source

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

#Div10 Source

class (Nat x) <= Div10 x q | x -> q, q -> x

Instances

#div10 Source

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

#IsDivBy Source

class (Pos d) <= IsDivBy d x 

Instances

#isDivBy Source

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

#GT Source

data GT

Instances

#Trich Source

class (Nat x, Nat y) <= Trich x y r | x y -> r

Instances

#trich Source

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

#CS Source

class CS r1 r2 r3 | r1 r2 -> r3

Instances

#Eq Source

class Eq x y 

Instances

#eq Source

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

#Gt Source

class Gt x y 

Instances

#gt Source

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

#Lt Source

class Lt x y 

Instances

#lt Source

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

#GtEq Source

class GtEq x y 

Instances

#gteq Source

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

#LtEq Source

class LtEq x y 

Instances

#lteq Source

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

#(==) Source

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

#(>) Source

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

#(<) Source

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

#(>=) Source

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

#(<=) Source

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

#MaxP Source

class MaxP x y b r | x y b -> r

Instances

#Max Source

class Max x y z | x y -> z

Instances

#max Source

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

#Min Source

class Min x y z | x y -> z

Instances

#min Source

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

#GCD Source

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

Instances

#GCDP Source

class (Nat x, Nat y, Nat gcd) <= GCDP x y yz cmp gcd | x y yz cmp -> gcd

Instances

#gcd Source

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