File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
vector/tests-inspect/Inspect Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
{-# LANGUAGE BangPatterns #-}
2
+ {-# LANGUAGE CPP #-}
2
3
{-# LANGUAGE ScopedTypeVariables #-}
3
4
{-# LANGUAGE TypeApplications #-}
4
5
{- |
@@ -30,9 +31,14 @@ tests = testGroup "allocations"
30
31
, testCase " ST"
31
32
$ checkAllocations (linear 8 )
32
33
$ (\ v -> runST $ VU. traverse (pureST . fromIntegral ) v) `whnf` vector
34
+ #if MIN_VERSION_base(4,15,0)
35
+ -- GHC<9.0 doesn't optimize this well. And there's no appetite
36
+ -- for finding out why. Thus it's disabled for them. We'll still
37
+ -- catch regression going forward.
33
38
, testCase " Identity"
34
39
$ checkAllocations (linear 8 )
35
40
$ VU. traverse (\ n -> Identity (10 * n)) `whnf` vector
41
+ #endif
36
42
-- NOTE: Naive traversal is lazy and allocated 2 words per element
37
43
--
38
44
-- , testCase "Const Sum"
You can’t perform that action at this time.
0 commit comments