@@ -29,12 +29,8 @@ import qualified Data.HashMap.Strict as HMS
2929import qualified Data.HashSet as HS
3030import qualified Test.Tasty as Tasty
3131
32- #if MIN_VERSION_base(4,12,0)
33- -- nothunks requires base >= 4.12
34- #define HAVE_NOTHUNKS
3532import qualified Data.Foldable as Foldable
3633import NoThunks.Class (noThunksInValues )
37- #endif
3834
3935issue32 :: Assertion
4036issue32 = assert $ isJust $ HMS. lookup 7 m'
@@ -141,7 +137,6 @@ issue254Strict = do
141137------------------------------------------------------------------------
142138-- Issue #379
143139
144- #ifdef HAVE_NOTHUNKS
145140
146141issue379Union :: Assertion
147142issue379Union = do
@@ -167,8 +162,6 @@ issue379StrictUnionWithKey = do
167162 mThunkInfo <- noThunksInValues mempty (Foldable. toList u)
168163 assert $ isNothing mThunkInfo
169164
170- #endif
171-
172165-- Another key type that always collides.
173166--
174167-- Note (sjakobi): The KC newtype of Int somehow can't be used to demonstrate
@@ -196,8 +189,6 @@ issue379LazyUnionWith = do
196189------------------------------------------------------------------------
197190-- Issue #381
198191
199- #ifdef HAVE_NOTHUNKS
200-
201192issue381mapMaybe :: Assertion
202193issue381mapMaybe = do
203194 let m0 = HMS. fromList [(KC 1 , 10 ), (KC 2 , 20 :: Int )]
@@ -212,8 +203,6 @@ issue381mapMaybeWithKey = do
212203 mThunkInfo <- noThunksInValues mempty (Foldable. toList m1)
213204 assert $ isNothing mThunkInfo
214205
215- #endif
216-
217206------------------------------------------------------------------------
218207-- Issue #382
219208
@@ -234,8 +223,6 @@ issue382 = do
234223------------------------------------------------------------------------
235224-- Issue #383
236225
237- #ifdef HAVE_NOTHUNKS
238-
239226-- Custom Functor to prevent interference from alterF rules
240227newtype MyIdentity a = MyIdentity a
241228instance Functor MyIdentity where
@@ -250,8 +237,6 @@ issue383 = do
250237 mThunkInfo <- noThunksInValues mempty (Foldable. toList m)
251238 assert $ isNothing mThunkInfo
252239
253- #endif
254-
255240------------------------------------------------------------------------
256241-- Issue #420
257242
@@ -288,22 +273,16 @@ tests = testGroup "Regression tests"
288273 , testCase " issue254 strict" issue254Strict
289274 , testGroup " issue379"
290275 [ testCase " Lazy.unionWith" issue379LazyUnionWith
291- #ifdef HAVE_NOTHUNKS
292276 , testCase " union" issue379Union
293277 , testCase " Strict.unionWith" issue379StrictUnionWith
294278 , testCase " Strict.unionWithKey" issue379StrictUnionWithKey
295- #endif
296279 ]
297- #ifdef HAVE_NOTHUNKS
298280 , testGroup " issue381"
299281 [ testCase " mapMaybe" issue381mapMaybe
300282 , testCase " mapMaybeWithKey" issue381mapMaybeWithKey
301283 ]
302- #endif
303284 , testCase " issue382" issue382
304- #ifdef HAVE_NOTHUNKS
305285 , testCase " issue383" issue383
306- #endif
307286 , testCase " issue420" issue420
308287 , issue491
309288 ]
0 commit comments