Idris2Doc : Data.IntegralGCD

Data.IntegralGCD

(source)

Definitions

interfaceIntegralGCD : Type->Type
  An interface for integer types that it is possible to take the GCD
(greatest common denominator) of.

This interface exists for totality purposes: Euclid's algorithm is
possible to implement for any type that satisfies `Integral`, but it
is not provably total unless that implementation satisfies some properties.

Implementing this interface asserts to the compiler that Euclid's algorithm
is total on this type.

Parameters: a
Constraints: Eq a, Integral a
Methods:
gcd : a->a->a

Implementations:
IntegralGCDInteger
IntegralGCDInt
IntegralGCDInt8
IntegralGCDInt16
IntegralGCDInt32
IntegralGCDInt64
IntegralGCDBits8
IntegralGCDBits16
IntegralGCDBits32
IntegralGCDBits64
gcd : IntegralGCDa=>a->a->a
Totality: total
Visibility: public export