[commit: base] master: Use divInteger and modInteger (ea74625)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.libraries
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ea74625471051d3b73bae87f26b6d087ba9c71dc

>---------------------------------------------------------------

commit ea74625471051d3b73bae87f26b6d087ba9c71dc
Author: Ian Lynagh <[email protected]>
Date:   Tue Jun 19 19:35:56 2012 +0100

    Use divInteger and modInteger

>---------------------------------------------------------------

 GHC/Real.lhs |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/GHC/Real.lhs b/GHC/Real.lhs
index 2e2ff09..5a2cec7 100644
--- a/GHC/Real.lhs
+++ b/GHC/Real.lhs
@@ -368,6 +368,12 @@ instance  Integral Integer where
     _ `rem` 0 = divZeroError
     n `rem`  d = n `remInteger`  d
 
+    _ `div` 0 = divZeroError
+    n `div` d = n `divInteger` d
+
+    _ `mov` 0 = divZeroError
+    n `mov`  d = n `movInteger`  d
+
     _ `divMod` 0 = divZeroError
     a `divMod` b = case a `divModInteger` b of
                    (# x, y #) -> (x, y)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.