diff options
Diffstat (limited to 'libraries/base/Data')
| -rw-r--r-- | libraries/base/Data/Bits.hs | 2 | ||||
| -rw-r--r-- | libraries/base/Data/OldList.hs | 10 | ||||
| -rw-r--r-- | libraries/base/Data/Semigroup.hs | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/libraries/base/Data/Bits.hs b/libraries/base/Data/Bits.hs index 525f098524..d12d6dc4bd 100644 --- a/libraries/base/Data/Bits.hs +++ b/libraries/base/Data/Bits.hs @@ -57,7 +57,7 @@ module Data.Bits ( #include "MachDeps.h" -#ifdef MIN_VERSION_integer_gmp +#if defined(MIN_VERSION_integer_gmp) # define HAVE_INTEGER_GMP1 MIN_VERSION_integer_gmp(1,0,0) #endif diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs index ec937e729b..bee1b6f98a 100644 --- a/libraries/base/Data/OldList.hs +++ b/libraries/base/Data/OldList.hs @@ -276,7 +276,7 @@ findIndex p = listToMaybe . findIndices p -- | The 'findIndices' function extends 'findIndex', by returning the -- indices of all elements satisfying the predicate, in ascending order. findIndices :: (a -> Bool) -> [a] -> [Int] -#ifdef USE_REPORT_PRELUDE +#if defined(USE_REPORT_PRELUDE) findIndices p xs = [ i | (x,i) <- zip xs [0..], p x] #else -- Efficient definition, adapted from Data.Sequence @@ -346,7 +346,7 @@ nub = nubBy (==) -- user-supplied equality predicate instead of the overloaded '==' -- function. nubBy :: (a -> a -> Bool) -> [a] -> [a] -#ifdef USE_REPORT_PRELUDE +#if defined(USE_REPORT_PRELUDE) nubBy eq [] = [] nubBy eq (x:xs) = x : nubBy eq (filter (\ y -> not (eq x y)) xs) #else @@ -824,7 +824,7 @@ sort :: (Ord a) => [a] -> [a] -- | The 'sortBy' function is the non-overloaded version of 'sort'. sortBy :: (a -> a -> Ordering) -> [a] -> [a] -#ifdef USE_REPORT_PRELUDE +#if defined(USE_REPORT_PRELUDE) sort = sortBy compare sortBy cmp = foldr (insertBy cmp) [] #else @@ -1083,7 +1083,7 @@ lines s = cons (case break (== '\n') s of -- | 'unlines' is an inverse operation to 'lines'. -- It joins lines, after appending a terminating newline to each. unlines :: [String] -> String -#ifdef USE_REPORT_PRELUDE +#if defined(USE_REPORT_PRELUDE) unlines = concatMap (++ "\n") #else -- HBC version (stolen) @@ -1118,7 +1118,7 @@ wordsFB c n = go -- | 'unwords' is an inverse operation to 'words'. -- It joins words with separating spaces. unwords :: [String] -> String -#ifdef USE_REPORT_PRELUDE +#if defined(USE_REPORT_PRELUDE) unwords [] = "" unwords ws = foldr1 (\w s -> w ++ ' ':s) ws #else diff --git a/libraries/base/Data/Semigroup.hs b/libraries/base/Data/Semigroup.hs index ec68683799..fae207ef97 100644 --- a/libraries/base/Data/Semigroup.hs +++ b/libraries/base/Data/Semigroup.hs @@ -85,7 +85,7 @@ import Data.Monoid (Alt (..)) import qualified Data.Monoid as Monoid import Data.Ord (Down(..)) import Data.Void -#ifndef mingw32_HOST_OS +#if !defined(mingw32_HOST_OS) import GHC.Event (Event, Lifetime) #endif import GHC.Generics @@ -725,7 +725,7 @@ instance Semigroup (Proxy s) where instance Semigroup a => Semigroup (IO a) where (<>) = liftA2 (<>) -#ifndef mingw32_HOST_OS +#if !defined(mingw32_HOST_OS) -- | @since 4.10.0.0 instance Semigroup Event where (<>) = mappend |
