packages/integer-gmp.git
5 years agoAdd some rules; fixes #5767 ghc-7.4.1-release integer-gmp-0.4.0.0-release
Ian Lynagh [Thu, 26 Jan 2012 13:58:04 +0000 (13:58 +0000)] 
Add some rules; fixes #5767

We now have rules for
    integerToInt    (smallInteger    x) = x
    integerToWord   (wordToInteger   x) = x
    integerToInt64  (int64ToInteger  x) = x
    integerToWord64 (word64ToInteger x) = x

5 years agoBump version number for 7.4.1 release
Ian Lynagh [Sun, 11 Dec 2011 22:30:53 +0000 (22:30 +0000)] 
Bump version number for 7.4.1 release

5 years agoUse the mingw touch program on Windows
Ian Lynagh [Fri, 2 Dec 2011 14:48:16 +0000 (14:48 +0000)] 
Use the mingw touch program on Windows

5 years agoTrack changes to the way we reference CCCS in GHC (was: W_[CCCS], now: CCCS)
Simon Marlow [Thu, 1 Dec 2011 12:18:43 +0000 (12:18 +0000)] 
Track changes to the way we reference CCCS in GHC (was: W_[CCCS], now: CCCS)

5 years agoupdate to track changes to CCCS in the RTS
Simon Marlow [Tue, 29 Nov 2011 09:37:23 +0000 (09:37 +0000)] 
update to track changes to CCCS in the RTS

6 years agoFollow GHC build system change to the way we call rm
Ian Lynagh [Sat, 19 Nov 2011 01:33:41 +0000 (01:33 +0000)] 
Follow GHC build system change to the way we call rm

6 years agoEliminate intermediate overflow for encodeFloat, fixes #5524
Daniel Fischer [Sat, 1 Oct 2011 11:59:55 +0000 (13:59 +0200)] 
Eliminate intermediate overflow for encodeFloat, fixes #5524

6 years agoUntabify cbits/float.c
Daniel Fischer [Fri, 30 Sep 2011 22:40:46 +0000 (00:40 +0200)] 
Untabify cbits/float.c

6 years agoDefine mkInteger
Ian Lynagh [Sat, 17 Sep 2011 17:20:41 +0000 (18:20 +0100)] 
Define mkInteger

Now used by GHC to generate Integer literals.

6 years agoExport GMP-only functions from the Internals module
Ian Lynagh [Tue, 13 Sep 2011 19:20:05 +0000 (20:20 +0100)] 
Export GMP-only functions from the Internals module

6 years agoNOINLINE a couple more functions
Ian Lynagh [Tue, 13 Sep 2011 18:48:38 +0000 (19:48 +0100)] 
NOINLINE a couple more functions

We don't need them to be inlined at all, following changes in how
GHC handles Integers.

6 years agoDon't export gcdInteger, lcmInteger from GHC.Integer
Ian Lynagh [Tue, 13 Sep 2011 17:29:20 +0000 (18:29 +0100)] 
Don't export gcdInteger, lcmInteger from GHC.Integer

integer-simple doesn't export them

6 years agoFollow ghc-prim changes
Ian Lynagh [Fri, 26 Aug 2011 20:38:26 +0000 (21:38 +0100)] 
Follow ghc-prim changes

6 years agoExport Integer(..) from GHC.Integer.GMP.Internals again; fixes #5419
Ian Lynagh [Thu, 25 Aug 2011 10:18:07 +0000 (11:18 +0100)] 
Export Integer(..) from GHC.Integer.GMP.Internals again; fixes #5419

The GMP primitives are now in GHC.Integer.GMP.Prim instead.

6 years agoRemove old darcs boring file
David Terei [Wed, 10 Aug 2011 19:31:38 +0000 (12:31 -0700)] 
Remove old darcs boring file

6 years agoThis should finally fix #5293 by fixing two bugs in GMP's configuration setup
Manuel M T Chakravarty [Thu, 4 Aug 2011 14:17:14 +0000 (00:17 +1000)] 
This should finally fix #5293 by fixing two bugs in GMP's configuration setup

* GMP uses m4 scripts to pre-process hand coded assembly routines
* These didn't properly account for OS X/i86_64 always using PIC

6 years agoEliminate orphan instances
Ian Lynagh [Sat, 30 Jul 2011 19:31:16 +0000 (20:31 +0100)] 
Eliminate orphan instances

The type and implementation are now in the same module, so the orphan
instances are no longer orphaned.

6 years agoNo need to export Integer from GHC.Integer.GMP.Internals
Ian Lynagh [Sat, 30 Jul 2011 18:42:15 +0000 (19:42 +0100)] 
No need to export Integer from GHC.Integer.GMP.Internals

This caused an odd dependency in the module hierarchy.

6 years agoUpgrade gmp, 4.2.4 -> 5.0.2
Ian Lynagh [Wed, 27 Jul 2011 14:28:08 +0000 (15:28 +0100)] 
Upgrade gmp, 4.2.4 -> 5.0.2

6 years agoDon't inline most integer operations
Ian Lynagh [Sat, 23 Jul 2011 16:56:40 +0000 (17:56 +0100)] 
Don't inline most integer operations

We get lots of code, and the simplifier generally can't do much with
it. We'll instead use builtin rules to do constant folding where
possible.

6 years agoRename toInt# -> integerToInt for consistency
Ian Lynagh [Sat, 23 Jul 2011 12:31:07 +0000 (13:31 +0100)] 
Rename toInt# -> integerToInt for consistency

6 years agoFix build following modules moving around
Ian Lynagh [Fri, 22 Jul 2011 18:18:39 +0000 (19:18 +0100)] 
Fix build following modules moving around

6 years agoEq and Ord instances are now in the integer package, not base
Ian Lynagh [Fri, 22 Jul 2011 18:09:46 +0000 (19:09 +0100)] 
Eq and Ord instances are now in the integer package, not base

6 years agoBump version number
Ian Lynagh [Wed, 6 Jul 2011 19:29:45 +0000 (20:29 +0100)] 
Bump version number

6 years agoFollow CC var changes in makefiles
Ian Lynagh [Sat, 23 Apr 2011 16:23:50 +0000 (17:23 +0100)] 
Follow CC var changes in makefiles

6 years agoMake and use AR_STAGE[0123] makefile vars
Ian Lynagh [Sat, 23 Apr 2011 16:22:36 +0000 (17:22 +0100)] 
Make and use AR_STAGE[0123] makefile vars

6 years agoPart of #5122 "Faster conversion between Rational and Double/Float" fix
Ian Lynagh [Fri, 22 Apr 2011 14:18:44 +0000 (15:18 +0100)] 
Part of #5122 "Faster conversion between Rational and Double/Float" fix

From daniel.is.fischer.

6 years agoTweak build rules
Ian Lynagh [Fri, 22 Apr 2011 11:50:34 +0000 (12:50 +0100)] 
Tweak build rules

We were doing
    echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g'
but the only x86 value HOSTPLATFORM can have is i386.

We now also tell GMP that its build platform is $(BUILDPLATFORM)
rather than $(HOSTPLATFORM).

6 years agoUpdate source-repository in the .cabal file to point to the git repo
Ian Lynagh [Tue, 5 Apr 2011 18:04:13 +0000 (19:04 +0100)] 
Update source-repository in the .cabal file to point to the git repo

6 years agoCall the final build system phase "final" rather than "" ghc-darcs-git-switchover
Ian Lynagh [Sun, 6 Feb 2011 20:32:32 +0000 (20:32 +0000)] 
Call the final build system phase "final" rather than ""

6 years agoUpdate for changes in GHC's build system
Ian Lynagh [Sat, 22 Jan 2011 19:47:56 +0000 (19:47 +0000)] 
Update for changes in GHC's build system

6 years agoCorrect the gmp build phase
Ian Lynagh [Mon, 17 Jan 2011 12:22:45 +0000 (12:22 +0000)] 
Correct the gmp build phase

6 years agoTidy up gmp cleaning
Ian Lynagh [Mon, 17 Jan 2011 12:12:24 +0000 (12:12 +0000)] 
Tidy up gmp cleaning

6 years agoAdd extensions to LANGUAGE pragmas
Ian Lynagh [Tue, 11 Jan 2011 00:30:50 +0000 (00:30 +0000)] 
Add extensions to LANGUAGE pragmas

6 years agoFix unknown symbol base_ControlziExceptionziBase_patError_info by helping GHC generat...
Edward Z. Yang [Sat, 4 Dec 2010 01:30:10 +0000 (01:30 +0000)] 
Fix unknown symbol base_ControlziExceptionziBase_patError_info by helping GHC generate smarter core.

7 years agoAdd LANGUAGE BangPatterns to modules that use bang patterns
simonpj@microsoft.com [Fri, 12 Nov 2010 17:06:04 +0000 (17:06 +0000)] 
Add LANGUAGE BangPatterns to modules that use bang patterns

7 years agoAdd a rewrite rule for toInt# so literals work right
simonpj@microsoft.com [Tue, 26 Oct 2010 08:29:55 +0000 (08:29 +0000)] 
Add a rewrite rule for toInt# so literals work right

See the comments with toInt#, but the key point is
that we want (fromInteger 1)::Int to yield (I# 1)!

7 years agoFollow GHC.Bool/GHC.Types merge
Ian Lynagh [Sat, 23 Oct 2010 15:36:31 +0000 (15:36 +0000)] 
Follow GHC.Bool/GHC.Types merge

7 years agoBump version number to 0.2.0.2
Ian Lynagh [Thu, 16 Sep 2010 17:00:32 +0000 (17:00 +0000)] 
Bump version number to 0.2.0.2

7 years agoFix compile warning on 32bit machine
David Terei [Tue, 17 Aug 2010 10:34:07 +0000 (10:34 +0000)] 
Fix compile warning on 32bit machine

7 years agofix hashInteger to be the same as fromIntegral, and document it (#4108)
Simon Marlow [Fri, 13 Aug 2010 15:31:42 +0000 (15:31 +0000)] 
fix hashInteger to be the same as fromIntegral, and document it (#4108)

7 years agoimplement integer2Int# and integer2Word# in Haskell, not foreign prim
Simon Marlow [Fri, 13 Aug 2010 15:29:26 +0000 (15:29 +0000)] 
implement integer2Int# and integer2Word# in Haskell, not foreign prim

7 years agoUse the stage-specific CONF_CC_OPTS variables
Ian Lynagh [Fri, 23 Jul 2010 13:59:33 +0000 (13:59 +0000)] 
Use the stage-specific CONF_CC_OPTS variables

7 years agoHide GHC.Integer from haddock again, now that haddock #24 is fixed; trac #2839 Haskell_2010_report_generated
Ian Lynagh [Wed, 23 Jun 2010 21:53:06 +0000 (21:53 +0000)] 
Hide GHC.Integer from haddock again, now that haddock #24 is fixed; trac #2839

7 years agoFollow SET_ARR_HDR change
Ian Lynagh [Sat, 19 Jun 2010 23:53:32 +0000 (23:53 +0000)] 
Follow SET_ARR_HDR change

7 years agoReplace an (incorrect) bytes-to-words calculation with ROUNDUP_BYTES_TO_WDS
Ian Lynagh [Sat, 19 Jun 2010 23:51:06 +0000 (23:51 +0000)] 
Replace an (incorrect) bytes-to-words calculation with ROUNDUP_BYTES_TO_WDS

7 years agoFIX #38000 Store StgArrWords payload size in bytes
Antoine Latter [Fri, 1 Jan 2010 18:34:37 +0000 (18:34 +0000)] 
FIX #38000 Store StgArrWords payload size in bytes

7 years agoFollow variable name changes
Ian Lynagh [Wed, 16 Jun 2010 16:16:28 +0000 (16:16 +0000)] 
Follow variable name changes

7 years agopass $(AR) to the GMP build
Simon Marlow [Thu, 10 Jun 2010 08:08:42 +0000 (08:08 +0000)] 
pass $(AR) to the GMP build

7 years agoFix the $(GMP_DIR) path that we remove
Ian Lynagh [Mon, 19 Apr 2010 19:35:38 +0000 (19:35 +0000)] 
Fix the $(GMP_DIR) path that we remove

7 years agoFix the build
Ian Lynagh [Mon, 15 Feb 2010 15:35:40 +0000 (15:35 +0000)] 
Fix the build
A missing | meant that the build broke on machines that don't have
libgmp available.

7 years agoDon't rely on tar supporting -j; trac #3841
Ian Lynagh [Sun, 14 Feb 2010 22:05:56 +0000 (22:05 +0000)] 
Don't rely on tar supporting -j; trac #3841

7 years agoMERGED: Pass GMP paths when compiling mkGmpDerivedConstants; fixes trac #3784
Ian Lynagh [Mon, 18 Jan 2010 21:51:42 +0000 (21:51 +0000)] 
MERGED: Pass GMP paths when compiling mkGmpDerivedConstants; fixes trac #3784
Ian Lynagh <igloo@earth.li>**20100118191831

7 years agoTag imported gmp symbols with the package they're from
Ben.Lippmeier@anu.edu.au [Sat, 2 Jan 2010 06:34:22 +0000 (06:34 +0000)] 
Tag imported gmp symbols with the package they're from

7 years agoMove .depend file dependency inside HaveLibGmp test
Simon Marlow [Thu, 17 Dec 2009 20:23:23 +0000 (20:23 +0000)] 
Move .depend file dependency inside HaveLibGmp test
We were building GMP even if we didn't need to.

7 years agoFix a makefile dep
Ian Lynagh [Wed, 16 Dec 2009 13:13:42 +0000 (13:13 +0000)] 
Fix a makefile dep

7 years agoAdd a missing dependency on gmp.h
Ian Lynagh [Tue, 15 Dec 2009 13:20:10 +0000 (13:20 +0000)] 
Add a missing dependency on gmp.h

7 years agoallocateLocal was renamed to allocate
Simon Marlow [Wed, 2 Dec 2009 09:15:17 +0000 (09:15 +0000)] 
allocateLocal was renamed to allocate

7 years agoUndo previous patch, caused linker problems on x86_64/linux
Ben.Lippmeier@anu.edu.au [Tue, 24 Nov 2009 03:12:54 +0000 (03:12 +0000)] 
Undo previous patch, caused linker problems on x86_64/linux

rolling back:

Sat Nov 21 16:43:13 EST 2009  Ben.Lippmeier@anu.edu.au
  * Windows DLLs: Tag imported gmp symbols with the package they're from.

    M ./cbits/gmp-wrappers.cmm -20 +20

7 years agoWindows DLLs: Tag imported gmp symbols with the package they're from.
Ben.Lippmeier@anu.edu.au [Sat, 21 Nov 2009 05:43:13 +0000 (05:43 +0000)] 
Windows DLLs: Tag imported gmp symbols with the package they're from.

8 years agoSet the path to nm before configuring the C gmp lib
Ian Lynagh [Mon, 12 Oct 2009 21:40:31 +0000 (21:40 +0000)] 
Set the path to nm before configuring the C gmp lib

8 years agoBump version to 0.2.0.0
Ian Lynagh [Sun, 20 Sep 2009 14:19:26 +0000 (14:19 +0000)] 
Bump version to 0.2.0.0

8 years agoUse CONF_CC_OPTS
Manuel M T Chakravarty [Thu, 17 Sep 2009 13:13:07 +0000 (13:13 +0000)] 
Use CONF_CC_OPTS
- Needed to get arch-dependent options, eg, on Snow Leopard

8 years agoUpdate to follow RTS tidyp changes
Simon Marlow [Sat, 1 Aug 2009 19:35:13 +0000 (19:35 +0000)] 
Update to follow RTS tidyp changes

8 years agofix conditionals (prevents GMP always being built)
Simon Marlow [Sat, 1 Aug 2009 22:37:24 +0000 (22:37 +0000)] 
fix conditionals (prevents GMP always being built)

8 years agoFix GC annotations in GMP_TAKE1_UL1_RET1()
Simon Marlow [Thu, 23 Jul 2009 12:39:01 +0000 (12:39 +0000)] 
Fix GC annotations in GMP_TAKE1_UL1_RET1()

8 years agoAdd primops for shifting
Ian Lynagh [Wed, 22 Jul 2009 01:48:40 +0000 (01:48 +0000)] 
Add primops for shifting

8 years agoRemove unused stack variable
Ian Lynagh [Tue, 21 Jul 2009 20:28:07 +0000 (20:28 +0000)] 
Remove unused stack variable

8 years agoWhitespace only, in gmp-wrappers.cmm
Ian Lynagh [Tue, 21 Jul 2009 20:26:40 +0000 (20:26 +0000)] 
Whitespace only, in gmp-wrappers.cmm

8 years agoMake integer-gmp suitable to be used directly, rather than via integer
Ian Lynagh [Tue, 21 Jul 2009 18:53:02 +0000 (18:53 +0000)] 
Make integer-gmp suitable to be used directly, rather than via integer

8 years agoAdd GmpDerivedConstants.h dependencies for all ways, not just vanilla
Ian Lynagh [Sat, 18 Jul 2009 14:56:28 +0000 (14:56 +0000)] 
Add GmpDerivedConstants.h dependencies for all ways, not just vanilla

8 years agofix mk/build.mk for HaveLibGmp/HaveFrameworkGMP
Austin Seipp [Mon, 6 Jul 2009 21:39:37 +0000 (21:39 +0000)] 
fix mk/build.mk for HaveLibGmp/HaveFrameworkGMP
Previously if you were to set HaveFrameworkGMP/HaveLibGmp in
mk/build.mk (e.g. on mac os) the settings would be ignored, as
gmp/config.mk is included late in GHC's ghc.mk, meaning autoconf
overrides your settings. Now they ignore the values picked up by
configure if you set these variables.

8 years agoCheck for whether we have gmp.h, as well as whether we have the gmp library
Ian Lynagh [Thu, 25 Jun 2009 16:29:33 +0000 (16:29 +0000)] 
Check for whether we have gmp.h, as well as whether we have the gmp library

8 years agoFix the case of HaveFrameworkGMP values
Ian Lynagh [Thu, 25 Jun 2009 16:25:44 +0000 (16:25 +0000)] 
Fix the case of HaveFrameworkGMP values

8 years agofix the dependencies on GmpDerivedConstants.h when HaveLibGmp==YES 2009-06-25
Simon Marlow [Tue, 23 Jun 2009 14:09:22 +0000 (14:09 +0000)] 
fix the dependencies on GmpDerivedConstants.h when HaveLibGmp==YES

8 years agoMake this package now really integer-gmp, rather than pretending it's integer
Ian Lynagh [Mon, 22 Jun 2009 22:18:12 +0000 (22:18 +0000)] 
Make this package now really integer-gmp, rather than pretending it's integer

8 years agodon't include config.mk if we're cleaning
Simon Marlow [Tue, 23 Jun 2009 10:03:35 +0000 (10:03 +0000)] 
don't include config.mk if we're cleaning

8 years agoPatch GMP to always use the GHC allocation functions
Ian Lynagh [Sun, 21 Jun 2009 18:29:57 +0000 (18:29 +0000)] 
Patch GMP to always use the GHC allocation functions
This works around a crash (only on OS X for some reason?) where the GHCi
GMP uses the systems memory allocator. We should fix this properly, by
making ghci run constructor functions.

8 years agogmp build tweaks
Ian Lynagh [Wed, 17 Jun 2009 12:17:20 +0000 (12:17 +0000)] 
gmp build tweaks

8 years agoMake configure fail if deriving the constants fails
Ian Lynagh [Tue, 16 Jun 2009 18:30:05 +0000 (18:30 +0000)] 
Make configure fail if deriving the constants fails

8 years agoImprove the configure script
Ian Lynagh [Tue, 16 Jun 2009 17:37:53 +0000 (17:37 +0000)] 
Improve the configure script

8 years agoDon't put "extra-libraries: gmp" in the cabal file; it comes from the buildinfo file
Ian Lynagh [Mon, 15 Jun 2009 20:25:12 +0000 (20:25 +0000)] 
Don't put "extra-libraries: gmp" in the cabal file; it comes from the buildinfo file

8 years agoFixes for building on machines that don't have gmp
Ian Lynagh [Mon, 15 Jun 2009 20:23:52 +0000 (20:23 +0000)] 
Fixes for building on machines that don't have gmp

8 years agoMove the int64 conversion functions here, from ghc-prim
Ian Lynagh [Mon, 15 Jun 2009 20:17:32 +0000 (20:17 +0000)] 
Move the int64 conversion functions here, from ghc-prim

8 years agoMove gmp to here, from the GHC repo
Ian Lynagh [Sun, 14 Jun 2009 18:32:55 +0000 (18:32 +0000)] 
Move gmp to here, from the GHC repo

8 years agoAdd a configure script and rely on local definitions of derived constants
Duncan Coutts [Sat, 13 Jun 2009 14:46:10 +0000 (14:46 +0000)] 
Add a configure script and rely on local definitions of derived constants

8 years agoTweak the small integer case of gcdInteger for better optimisation
Duncan Coutts [Sat, 13 Jun 2009 13:40:49 +0000 (13:40 +0000)] 
Tweak the small integer case of gcdInteger for better optimisation
The gcdInt function in the base package now calls gcdInteger with
two small integers. With this weak, the optimiser generates a base
gcdInt that directly calls the gcdInt# primop from this package.
This means there should be no additional overhead compared to when
the base gcdInt called the gcdInt# primop directly.

8 years agoImplement the gmp primops in the integer-gmp package using cmm
Duncan Coutts [Sat, 13 Jun 2009 13:37:50 +0000 (13:37 +0000)] 
Implement the gmp primops in the integer-gmp package using cmm

8 years agoAdd __encodeDouble and __encodeFloat
Duncan Coutts [Thu, 11 Jun 2009 15:49:51 +0000 (15:49 +0000)] 
Add __encodeDouble and __encodeFloat
Moved here from the rts.

8 years agoRemove the unused decodeFloatInteger
Ian Lynagh [Tue, 2 Jun 2009 18:22:20 +0000 (18:22 +0000)] 
Remove the unused decodeFloatInteger

8 years agoUse a bang pattern when we where/let-bind values with unlifted types
Ian Lynagh [Fri, 24 Apr 2009 12:53:37 +0000 (12:53 +0000)] 
Use a bang pattern when we where/let-bind values with unlifted types

8 years agoDon't set -Wall -Werror in the .cabal file
Ian Lynagh [Thu, 12 Mar 2009 12:57:09 +0000 (12:57 +0000)] 
Don't set -Wall -Werror in the .cabal file

8 years agoDon't hide GHC.Integer from haddock; fixes trac #2839
Ian Lynagh [Wed, 11 Feb 2009 16:26:19 +0000 (16:26 +0000)] 
Don't hide GHC.Integer from haddock; fixes trac #2839
This works around haddock not exporting docs across package boundaries

8 years agoRequire Cabal version >= 1.6
Ian Lynagh [Thu, 22 Jan 2009 01:13:10 +0000 (01:13 +0000)] 
Require Cabal version >= 1.6

8 years agoAdd "bug-reports" and "source-repository" info to the Cabal file
Ian Lynagh [Wed, 21 Jan 2009 18:24:59 +0000 (18:24 +0000)] 
Add "bug-reports" and "source-repository" info to the Cabal file

9 years agoFix performance regression in quotRemInteger/divModInteger
Simon Marlow [Thu, 20 Nov 2008 09:58:15 +0000 (09:58 +0000)] 
Fix performance regression in quotRemInteger/divModInteger
This fixes most of the performance regression in these functions
between 6.8.3 and 6.10.1, it was due to a slight difference in the
strictness between the old and new versions (see comments for
details).  There's still a few percent loss in performance in the div
test in nofib/spectral/integer that I haven't tracked down as yet.

9 years agoMove the Integer type definition into GHC.Integer.Internals
Ian Lynagh [Thu, 25 Sep 2008 13:39:35 +0000 (13:39 +0000)] 
Move the Integer type definition into GHC.Integer.Internals
This means that we can export the constructors, but still keep the
GHC.Integer interface generic.

9 years agoPad version number to 0.1.0.0
Ian Lynagh [Sat, 20 Sep 2008 16:01:39 +0000 (16:01 +0000)] 
Pad version number to 0.1.0.0

9 years agoAdd a .darcs-boring file 6_10_branch_has_been_forked
Ian Lynagh [Fri, 27 Jun 2008 15:54:53 +0000 (15:54 +0000)] 
Add a .darcs-boring file

9 years agoAvoid using deprecated flags
Ian Lynagh [Mon, 16 Jun 2008 14:53:51 +0000 (14:53 +0000)] 
Avoid using deprecated flags