Skip to content

Commit d911880

Browse files
committed
Reduce amount of CPP by removing redundant HAVE_DEEPSEQ conditional
1 parent f3a524c commit d911880

File tree

6 files changed

+3
-14
lines changed

6 files changed

+3
-14
lines changed

Data/Text.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ import Prelude (Char, Bool(..), Int, Maybe(..), String,
204204
Read(..),
205205
(&&), (||), (+), (-), (.), ($), ($!), (>>),
206206
not, return, otherwise, quot)
207-
#if defined(HAVE_DEEPSEQ)
208207
import Control.DeepSeq (NFData(rnf))
209-
#endif
210208
#if defined(ASSERTS)
211209
import Control.Exception (assert)
212210
#endif
@@ -381,9 +379,7 @@ instance Exts.IsList Text where
381379
toList = unpack
382380
#endif
383381

384-
#if defined(HAVE_DEEPSEQ)
385382
instance NFData Text where rnf !_ = ()
386-
#endif
387383

388384
-- | @since 1.2.1.0
389385
instance Binary Text where

Data/Text/Lazy.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ import Prelude (Char, Bool(..), Maybe(..), String,
205205
(&&), (||), (+), (-), (.), ($), (++),
206206
error, flip, fmap, fromIntegral, not, otherwise, quot)
207207
import qualified Prelude as P
208-
#if defined(HAVE_DEEPSEQ)
209208
import Control.DeepSeq (NFData(..))
210-
#endif
211209
import Data.Int (Int64)
212210
import qualified Data.List as L
213211
import Data.Char (isSpace)
@@ -375,11 +373,9 @@ instance Exts.IsList Text where
375373
toList = unpack
376374
#endif
377375

378-
#if defined(HAVE_DEEPSEQ)
379376
instance NFData Text where
380377
rnf Empty = ()
381378
rnf (Chunk _ ts) = rnf ts
382-
#endif
383379

384380
-- | @since 1.2.1.0
385381
instance Binary Text where

benchmarks/text-benchmarks.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ executable text-benchmarks
2828
ghc-options: -Wall -O2 -rtsopts
2929
if flag(llvm)
3030
ghc-options: -fllvm
31-
cpp-options: -DHAVE_DEEPSEQ -DINTEGER_GMP
31+
cpp-options: -DINTEGER_GMP
3232
build-depends: array,
3333
base == 4.*,
3434
binary,

tests/.ghci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
:set -DHAVE_DEEPSEQ -isrc -i../..
1+
:set -isrc -i../..

tests/text-tests.cabal

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ executable text-tests
4747
cpp-options:
4848
-DTEST_SUITE
4949
-DASSERTS
50-
-DHAVE_DEEPSEQ
5150

5251
build-depends:
5352
HUnit >= 1.2,
@@ -139,7 +138,6 @@ library
139138

140139
cpp-options:
141140
-DTEST_SUITE
142-
-DHAVE_DEEPSEQ
143141
-DASSERTS
144142
-DINTEGER_GMP
145143

text.cabal

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ library
155155
else
156156
build-depends: bytestring >= 0.10.4 && < 0.11
157157

158-
cpp-options: -DHAVE_DEEPSEQ
159158
ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
160159
if flag(developer)
161160
ghc-prof-options: -auto-all
@@ -178,7 +177,7 @@ test-suite tests
178177
-Wall -threaded -rtsopts
179178

180179
cpp-options:
181-
-DASSERTS -DHAVE_DEEPSEQ -DTEST_SUITE
180+
-DASSERTS -DTEST_SUITE
182181

183182
-- modules specific to test-suite
184183
hs-source-dirs: tests

0 commit comments

Comments
 (0)