Use assert_smaller instead of assert_total

This commit is contained in:
Kiana Sheibani 2024-06-06 20:51:11 -04:00 committed by GitHub
parent 42d216fb98
commit 0dbd3e6bc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,7 @@ interface (Eq a, Integral a) => IntegralGCD a where
gcd x y =
if x == 0 then y
else if y == 0 then x
else assert_total $ gcd y (x `mod` y)
else gcd y (assert_smaller y $ x `mod` y)
export IntegralGCD Integer where