diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2019-01-08 10:41:50 -0800 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-01-16 14:17:11 -0500 |
commit | f7def747cf0da103237cd17af5c8bfdbdf5823b2 (patch) | |
tree | ea30ac28f46abdcbeeea441373ac3e3443fbac80 /libraries/base/GHC/Read.hs | |
parent | 6e320c279ddfde1e16da204590c1c66a511d9b52 (diff) | |
download | haskell-f7def747cf0da103237cd17af5c8bfdbdf5823b2.tar.gz |
Remove from `base` obsolete CPP for `integer-gmp`
* `GHC.Natural` now exports the same functions (regardless of integer backend)
* remove unnecessary CPP around instances
* remove the 'OPTIMISE_INTEGER_GCD_LCM' flag - almost all of those optimizations
now work regardless of which integer backend is used
Note that some CPP still remains for situations where there are backend-specific
optimization hacks (like a more efficient GMP-only `gcd` for `Int#` and `Word#`).
Diffstat (limited to 'libraries/base/GHC/Read.hs')
-rw-r--r-- | libraries/base/GHC/Read.hs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/libraries/base/GHC/Read.hs b/libraries/base/GHC/Read.hs index 26dca6ab65..2283942a8f 100644 --- a/libraries/base/GHC/Read.hs +++ b/libraries/base/GHC/Read.hs @@ -618,17 +618,10 @@ instance Read Integer where readList = readListDefault -#if defined(MIN_VERSION_integer_gmp) -- | @since 4.8.0.0 instance Read Natural where readsPrec d = map (\(n, s) -> (fromInteger n, s)) . filter ((>= 0) . (\(x,_)->x)) . readsPrec d -#else --- | @since 4.8.0.0 -instance Read Natural where - readsPrec d = map (\(n, s) -> (Natural n, s)) - . filter ((>= 0) . (\(x,_)->x)) . readsPrec d -#endif -- | @since 2.01 instance Read Float where |