Skip to content

Commit 9c5cf65

Browse files
committed
Disable allocation test for GHC<9.0
1 parent 1097859 commit 9c5cf65

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vector/tests-inspect/Inspect/Alloc.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE BangPatterns #-}
2+
{-# LANGUAGE CPP #-}
23
{-# LANGUAGE ScopedTypeVariables #-}
34
{-# LANGUAGE TypeApplications #-}
45
{- |
@@ -30,9 +31,14 @@ tests = testGroup "allocations"
3031
, testCase "ST"
3132
$ checkAllocations (linear 8)
3233
$ (\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.
3338
, testCase "Identity"
3439
$ checkAllocations (linear 8)
3540
$ VU.traverse (\n -> Identity (10*n)) `whnf` vector
41+
#endif
3642
-- NOTE: Naive traversal is lazy and allocated 2 words per element
3743
--
3844
-- , testCase "Const Sum"

0 commit comments

Comments
 (0)