GcdDomain represents a
GCD domain. This is a domain,
where GCD can be defined, but which does not necessarily allow a
well-behaved division with remainder (as in
Euclidean domains).
For example, there is no way to define
rem over polynomials
with integer coefficients such that remainder is always "smaller" than
divisor. However,
gcd is still definable, just not by means of
Euclidean algorithm.
All methods of
GcdDomain have default implementations in terms
of
Euclidean. So most of the time it is enough to write:
instance GcdDomain Foo
instance Euclidean Foo where
quotRem = ...
degree = ...