diff options
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/Real.hs | 4 | ||||
-rw-r--r-- | libraries/base/base.cabal | 19 |
2 files changed, 22 insertions, 1 deletions
diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs index dd806bc561..2b5f6cc78d 100644 --- a/libraries/base/GHC/Real.hs +++ b/libraries/base/GHC/Real.hs @@ -27,7 +27,11 @@ import GHC.Show import {-# SOURCE #-} GHC.Exception( divZeroException, overflowException, ratioZeroDenomException ) #ifdef OPTIMISE_INTEGER_GCD_LCM +# if defined(MIN_VERSION_integer_gmp) || defined(MIN_VERSION_integer_gmp2) import GHC.Integer.GMP.Internals +# else +# error unsupported OPTIMISE_INTEGER_GCD_LCM configuration +# endif #endif infixr 8 ^, ^^ diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal index 7e5ca15476..c3f4d28a1e 100644 --- a/libraries/base/base.cabal +++ b/libraries/base/base.cabal @@ -44,6 +44,18 @@ source-repository head Flag integer-simple Description: Use integer-simple + Manual: True + Default: False + +Flag integer-gmp + Description: Use integer-gmp + Manual: True + Default: False + +Flag integer-gmp2 + Description: Use integer-gmp2 + Manual: True + Default: False Library default-language: Haskell2010 @@ -90,10 +102,15 @@ Library build-depends: rts == 1.0.*, ghc-prim >= 0.3.1 && < 0.4 if flag(integer-simple) build-depends: integer-simple >= 0.1.1 && < 0.2 - else + + if flag(integer-gmp) build-depends: integer-gmp >= 0.5.1 && < 0.6 cpp-options: -DOPTIMISE_INTEGER_GCD_LCM + if flag(integer-gmp2) + build-depends: integer-gmp >= 1.0 && < 1.1 + cpp-options: -DOPTIMISE_INTEGER_GCD_LCM + exposed-modules: Control.Applicative Control.Arrow |