summaryrefslogtreecommitdiff
path: root/libraries/integer-gmp/src/GHC/Integer.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-03-29 19:02:08 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2015-03-31 10:59:36 +0200
commit995e8c1c8692b60c907c7d2ccea179d52ca8e69e (patch)
tree1314ec36672d72b33a99b33e017316c0b8585625 /libraries/integer-gmp/src/GHC/Integer.hs
parent1f69f37f34c6f15fd900c2c1cce3ce896168dde9 (diff)
downloadhaskell-995e8c1c8692b60c907c7d2ccea179d52ca8e69e.tar.gz
Drop old integer-gmp-0.5 from GHC source tree
This completes what c774b28f76ee4c220f7c1c9fd81585e0e3af0e8a (#9281) started. `integer-gmp-1.0` was added as an additional `libraries/integer-gmp2` folder while retaining the ability to configure GHC w/ the old `integer-gmp-0.5` to have a way back, and or the ability to easily switch between old/new `integer-gmp` for benchmark/debugging purposes. This commit removes the old `libraries/integer-gmp` folder and moves `libraries/integer-gmp2` into its place, while removing any mentions of "gmp2" as well as the to support two different `integer-gmp` packages in GHC's source-tree. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D769
Diffstat (limited to 'libraries/integer-gmp/src/GHC/Integer.hs')
-rw-r--r--libraries/integer-gmp/src/GHC/Integer.hs73
1 files changed, 73 insertions, 0 deletions
diff --git a/libraries/integer-gmp/src/GHC/Integer.hs b/libraries/integer-gmp/src/GHC/Integer.hs
new file mode 100644
index 0000000000..ffd708bb93
--- /dev/null
+++ b/libraries/integer-gmp/src/GHC/Integer.hs
@@ -0,0 +1,73 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+
+#include "MachDeps.h"
+
+-- |
+-- Module : GHC.Integer.Type
+-- Copyright : (c) Herbert Valerio Riedel 2014
+-- License : BSD3
+--
+-- Maintainer : ghc-devs@haskell.org
+-- Stability : provisional
+-- Portability : non-portable (GHC Extensions)
+--
+-- The 'Integer' type.
+--
+-- This module exposes the /portable/ 'Integer' API. See
+-- "GHC.Integer.GMP.Internals" for the @integer-gmp@-specific internal
+-- representation of 'Integer' as well as optimized GMP-specific
+-- operations.
+
+module GHC.Integer (
+ Integer,
+
+ -- * Construct 'Integer's
+ mkInteger, smallInteger, wordToInteger,
+#if WORD_SIZE_IN_BITS < 64
+ word64ToInteger, int64ToInteger,
+#endif
+ -- * Conversion to other integral types
+ integerToWord, integerToInt,
+#if WORD_SIZE_IN_BITS < 64
+ integerToWord64, integerToInt64,
+#endif
+
+ -- * Helpers for 'RealFloat' type-class operations
+ encodeFloatInteger, floatFromInteger,
+ encodeDoubleInteger, decodeDoubleInteger, doubleFromInteger,
+
+ -- * Arithmetic operations
+ plusInteger, minusInteger, timesInteger, negateInteger,
+ absInteger, signumInteger,
+
+ divModInteger, divInteger, modInteger,
+ quotRemInteger, quotInteger, remInteger,
+
+ -- * Comparison predicates
+ eqInteger, neqInteger, leInteger, gtInteger, ltInteger, geInteger,
+ compareInteger,
+
+ -- ** 'Int#'-boolean valued versions of comparision predicates
+ --
+ -- | These operations return @0#@ and @1#@ instead of 'False' and
+ -- 'True' respectively. See
+ -- <https://ghc.haskell.org/trac/ghc/wiki/PrimBool PrimBool wiki-page>
+ -- for more details
+ eqInteger#, neqInteger#, leInteger#, gtInteger#, ltInteger#, geInteger#,
+
+
+ -- * Bit-operations
+ andInteger, orInteger, xorInteger,
+
+ complementInteger,
+ shiftLInteger, shiftRInteger, testBitInteger,
+
+ -- * Hashing
+ hashInteger,
+ ) where
+
+import GHC.Integer.Type
+
+default ()