Skip to content

Commit 7a0aecd

Browse files
vooooohooodoooo!
1 parent c07fa82 commit 7a0aecd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Constrained/NumOrd.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ instance {-# OVERLAPPABLE #-} (HasSpec a, MaybeBounded a, Integral a, TypeSpec a
744744
| a == -1 = negate l
745745
| otherwise =
746746
let r = l `div` a in
747-
if r * a < l
747+
if toInteger r * toInteger a < toInteger l
748748
then r + signum a
749749
else r
750750

@@ -753,7 +753,7 @@ instance {-# OVERLAPPABLE #-} (HasSpec a, MaybeBounded a, Integral a, TypeSpec a
753753
| a == -1 = negate u
754754
| otherwise =
755755
let r = u `div` a in
756-
if r * a > u
756+
if toInteger r * toInteger a > toInteger u
757757
then r - signum a
758758
else r
759759

0 commit comments

Comments
 (0)