public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-lang/ghc/files: ghc-7.6.2-integer-simple-div-mod.patch
@ 2013-04-14  8:28 Sergei Trofimovich (slyfox)
  0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich (slyfox) @ 2013-04-14  8:28 UTC (permalink / raw
  To: gentoo-commits

slyfox      13/04/14 08:28:33

  Added:                ghc-7.6.2-integer-simple-div-mod.patch
  Log:
  Disabled usage of system's libffi workaround on unregisterised arches (fixes bug #463814 by Agostino Sarubbo). Added USE=gmp (using ineteger-simple restores ia64 support).
  
  (Portage version: 2.2.0_alpha172/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)

Revision  Changes    Path
1.1                  dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch?rev=1.1&content-type=text/plain

Index: ghc-7.6.2-integer-simple-div-mod.patch
===================================================================
commit de13417726b90b0945aaaf0b9cfbaf8ab975d8b5
Author: Gabor Greif <ggreif@gmail.com>
Date:   Tue Jul 24 14:31:36 2012 +0200

    track integer-gmp and add 'divInteger', 'modInteger'

diff --git a/libraries/integer-simple/GHC/Integer.hs b/libraries/integer-simple/GHC/Integer.hs
index c9b50a7..4122d38 100644
--- a/libraries/integer-simple/GHC/Integer.hs
+++ b/libraries/integer-simple/GHC/Integer.hs
@@ -4,7 +4,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  GHC.Integer
--- Copyright   :  (c) Ian Lynagh 2007-2008
+-- Copyright   :  (c) Ian Lynagh 2007-2012
 -- License     :  BSD3
 --
 -- Maintainer  :  igloo@earth.li
@@ -27,6 +27,7 @@ module GHC.Integer (
     plusInteger, minusInteger, timesInteger, negateInteger,
     eqInteger, neqInteger, absInteger, signumInteger,
     leInteger, gtInteger, ltInteger, geInteger, compareInteger,
+    divInteger, modInteger,
     divModInteger, quotRemInteger, quotInteger, remInteger,
     encodeFloatInteger, decodeFloatInteger, floatFromInteger,
     encodeDoubleInteger, decodeDoubleInteger, doubleFromInteger,
diff --git a/libraries/integer-simple/GHC/Integer/Type.hs b/libraries/integer-simple/GHC/Integer/Type.hs
index c3d812c..67ed19c 100644
--- a/libraries/integer-simple/GHC/Integer/Type.hs
+++ b/libraries/integer-simple/GHC/Integer/Type.hs
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  GHC.Integer.Type
--- Copyright   :  (c) Ian Lynagh 2007-2008
+-- Copyright   :  (c) Ian Lynagh 2007-2012
 -- License     :  BSD3
 --
 -- Maintainer  :  igloo@earth.li
@@ -370,6 +370,16 @@ n `divModInteger` d =
             then (# q `minusInteger` oneInteger, r `plusInteger` d #)
             else (# q, r #)
 
+{-# NOINLINE divInteger #-}
+divInteger :: Integer -> Integer -> Integer
+n `divInteger` d = quotient
+    where (# quotient, _ #) = n `divModInteger` d
+
+{-# NOINLINE modInteger #-}
+modInteger :: Integer -> Integer -> Integer
+n `modInteger` d = modulus
+    where (# _, modulus #) = n `divModInteger` d
+
 {-# NOINLINE quotRemInteger #-}
 quotRemInteger :: Integer -> Integer -> (# Integer, Integer #)
 Naught      `quotRemInteger` (!_)        = (# Naught, Naught #)





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-14  8:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14  8:28 [gentoo-commits] gentoo-x86 commit in dev-lang/ghc/files: ghc-7.6.2-integer-simple-div-mod.patch Sergei Trofimovich (slyfox)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox