Division fails fast for `divMod` \w integer-simple
authorAlec Theriault <alec.theriault@gmail.com>
Mon, 24 Dec 2018 18:35:18 +0000 (13:35 -0500)
committerBen Gamari <ben@well-typed.com>
Thu, 27 Dec 2018 19:21:13 +0000 (14:21 -0500)
commitbbea972149882b4f5f6b0a1691488a519ba6aaf9
tree7a434f8efce5871fbc13faa73139a4526751fb8f
parent29ecb52033b951e09b6141aeb92460db2f4c3183
Division fails fast for `divMod` \w integer-simple

We want to match the behaviour of `Integer` as well as
`Integer`/`Natural` from `integer-gmp`, namely to have

     divMod x 0 = _|_

not

     divMod x 0 = (_|_, _|_)

See #16091 for an example of where this matters.
libraries/base/GHC/Real.hs