Skip to content

Commit

Permalink
Allow ghc-9.10 and containers-0.7
Browse files Browse the repository at this point in the history
Cherry-picked from [1], and also add CPP to avoid importing foldl' from
Data.List when GHC >= 9.10, since foldl' is included in Prelude.

[1]: e507083
  • Loading branch information
pgujjula committed Dec 11, 2024
1 parent 6d60064 commit 1e0c1bd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
13 changes: 7 additions & 6 deletions apply-merge.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tested-with:
, GHC == 9.4.8
, GHC == 9.6.5
, GHC == 9.8.2
, GHC == 9.10.1
extra-doc-files:
README.md
ChangeLog.md
Expand All @@ -43,8 +44,8 @@ library
src
ghc-options: -Wall -Wunused-packages
build-depends:
base >=4.16 && <4.17 || >=4.17 && <4.18 || >=4.18 && <4.19 || >=4.19 && <4.20
, containers ==0.6.*
base >=4.16 && <4.17 || >=4.17 && <4.18 || >=4.18 && <4.19 || >=4.19 && <4.20 || >=4.20 && <4.21
, containers >=0.6 && <0.7 || >=0.7 && <0.8
, pqueue >=1.4 && <1.5 || >=1.5 && <1.6
, reflection ==2.1.*
default-language: GHC2021
Expand Down Expand Up @@ -74,8 +75,8 @@ test-suite apply-merge-tests
test
ghc-options: -Wall -Wunused-packages
build-depends:
base >=4.16 && <4.17 || >=4.17 && <4.18 || >=4.18 && <4.19 || >=4.19 && <4.20
, containers ==0.6.*
base >=4.16 && <4.17 || >=4.17 && <4.18 || >=4.18 && <4.19 || >=4.19 && <4.20 || >=4.20 && <4.21
, containers >=0.6 && <0.7 || >=0.7 && <0.8
, data-ordlist ==0.4.*
, pqueue >=1.4 && <1.5 || >=1.5 && <1.6
, reflection ==2.1.*
Expand Down Expand Up @@ -108,8 +109,8 @@ benchmark apply-merge-benchmarks
bench
ghc-options: -Wall -Wunused-packages
build-depends:
base >=4.16 && <4.17 || >=4.17 && <4.18 || >=4.18 && <4.19 || >=4.19 && <4.20
, containers ==0.6.*
base >=4.16 && <4.17 || >=4.17 && <4.18 || >=4.18 && <4.19 || >=4.19 && <4.20 || >=4.20 && <4.21
, containers >=0.6 && <0.7 || >=0.7 && <0.8
, data-ordlist ==0.4.*
, pqueue >=1.4 && <1.5 || >=1.5 && <1.6
, reflection ==2.1.*
Expand Down
4 changes: 4 additions & 0 deletions bench/Bench/PriorityQueue/MinPQueue.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
-- SPDX-FileCopyrightText: Copyright Preetham Gujjula
-- SPDX-License-Identifier: BSD-3-Clause
{-# LANGUAGE CPP #-}

module Bench.PriorityQueue.MinPQueue (benchmarks) where

#if !MIN_VERSION_base(4,20,0)
import Data.List (foldl')
#endif
import Data.PQueue.Prio.Min (deleteMin, fromAscList, getMin, insert)
import Test.Tasty.Bench (Benchmark, bench, bgroup, nf)

Expand Down
9 changes: 5 additions & 4 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tested-with:
- GHC == 9.4.8
- GHC == 9.6.5
- GHC == 9.8.2
- GHC == 9.10.1

extra-doc-files:
- README.md
Expand All @@ -33,7 +34,7 @@ ghc-options:
- -Wunused-packages

dependencies:
- base ^>= {4.16, 4.17, 4.18, 4.19}
- base ^>= {4.16, 4.17, 4.18, 4.19, 4.20}

library:
source-dirs: src
Expand All @@ -43,7 +44,7 @@ library:
other-modules:
- ApplyMerge.IntSet
dependencies:
- containers ^>= {0.6}
- containers ^>= {0.6, 0.7}
- pqueue ^>= {1.4, 1.5}
- reflection ^>= {2.1}

Expand All @@ -64,7 +65,7 @@ tests:
- test
main: Main.hs
dependencies:
- containers ^>= {0.6}
- containers ^>= {0.6, 0.7}
- data-ordlist ^>= {0.4}
- pqueue ^>= {1.4, 1.5}
- reflection ^>= {2.1}
Expand All @@ -82,7 +83,7 @@ benchmarks:
- bench
main: Main.hs
dependencies:
- containers ^>= {0.6}
- containers ^>= {0.6, 0.7}
- data-ordlist ^>= {0.4}
- pqueue ^>= {1.4, 1.5}
- reflection ^>= {2.1}
Expand Down

0 comments on commit 1e0c1bd

Please sign in to comment.