Skip to content

Commit 8e7530e

Browse files
authored
Use the TESTING macro less (#1084)
It's not necessary to use it for conditional exports or SafeHaskell.
1 parent 32c80d8 commit 8e7530e

File tree

16 files changed

+14
-53
lines changed

16 files changed

+14
-53
lines changed

containers-tests/tests/set-properties.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Data.List (nub, sort, sortBy)
44
import qualified Data.List as List
55
import Data.Maybe
66
import Data.Set
7+
import Data.Set.Internal (link, merge)
78
import Prelude hiding (lookup, null, map, filter, foldr, foldl, foldl', all, take, drop, splitAt)
89
import Test.Tasty
910
import Test.Tasty.HUnit

containers/src/Data/IntMap.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE CPP #-}
2-
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
2+
#ifdef __GLASGOW_HASKELL__
33
{-# LANGUAGE Safe #-}
44
#endif
55

containers/src/Data/IntMap/Internal.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
{-# LANGUAGE ScopedTypeVariables #-}
88
{-# LANGUAGE StandaloneDeriving #-}
99
{-# LANGUAGE TypeFamilies #-}
10-
#endif
11-
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
1210
{-# LANGUAGE Trustworthy #-}
1311
#endif
1412

containers/src/Data/IntMap/Lazy.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE CPP #-}
2-
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
2+
#ifdef __GLASGOW_HASKELL__
33
{-# LANGUAGE Safe #-}
44
#endif
55

@@ -70,11 +70,7 @@
7070

7171
module Data.IntMap.Lazy (
7272
-- * Map type
73-
#if !defined(TESTING)
7473
IntMap, Key -- instance Eq,Show
75-
#else
76-
IntMap(..), Key -- instance Eq,Show
77-
#endif
7874

7975
-- * Construction
8076
, empty

containers/src/Data/IntMap/Merge/Lazy.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE CPP #-}
2-
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
2+
#ifdef __GLASGOW_HASKELL__
33
{-# LANGUAGE Safe #-}
44
#endif
55

containers/src/Data/IntMap/Merge/Strict.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE BangPatterns #-}
3-
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
3+
#ifdef __GLASGOW_HASKELL__
44
{-# LANGUAGE Trustworthy #-}
55
#endif
66

containers/src/Data/IntMap/Strict.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE CPP #-}
2-
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
2+
#ifdef __GLASGOW_HASKELL__
33
{-# LANGUAGE Trustworthy #-}
44
#endif
55

@@ -88,11 +88,7 @@
8888

8989
module Data.IntMap.Strict (
9090
-- * Map type
91-
#if !defined(TESTING)
9291
IntMap, Key -- instance Eq,Show
93-
#else
94-
IntMap(..), Key -- instance Eq,Show
95-
#endif
9692

9793
-- * Construction
9894
, empty

containers/src/Data/IntMap/Strict/Internal.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@
8686

8787
module Data.IntMap.Strict.Internal (
8888
-- * Map type
89-
#if !defined(TESTING)
9089
IntMap, Key -- instance Eq,Show
91-
#else
92-
IntMap(..), Key -- instance Eq,Show
93-
#endif
9490

9591
-- * Construction
9692
, empty

containers/src/Data/IntSet.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE CPP #-}
2-
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
2+
#ifdef __GLASGOW_HASKELL__
33
{-# LANGUAGE Safe #-}
44
#endif
55

@@ -66,11 +66,7 @@
6666

6767
module Data.IntSet (
6868
-- * Set type
69-
#if !defined(TESTING)
7069
IntSet -- instance Eq,Show
71-
#else
72-
IntSet(..) -- instance Eq,Show
73-
#endif
7470
, Key
7571

7672
-- * Construction

containers/src/Data/IntSet/Internal.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
{-# LANGUAGE MagicHash #-}
77
{-# LANGUAGE StandaloneDeriving #-}
88
{-# LANGUAGE TypeFamilies #-}
9-
#endif
10-
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
119
{-# LANGUAGE Trustworthy #-}
1210
#endif
1311

0 commit comments

Comments
 (0)