Skip to content

Commit

Permalink
Bump lower bounds, use GHC.Integer from base-4.15
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed May 11, 2021
1 parent e239196 commit 488cdfb
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 25 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
#
name: Haskell-CI
on:
- push
- pull_request
push:
branches:
- master
pull_request:
branches:
- master
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
dist
dist-newstyle
cabal.project.local
.ghc.environment.*
2 changes: 2 additions & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
branches: master
benchmarks: False
63 changes: 40 additions & 23 deletions scientific.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ build-type: Simple
cabal-version: >=1.10
extra-source-files: changelog
tested-with:
GHC ==7.4.2 || ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1
GHC ==7.4.2
|| ==7.6.3
|| ==7.8.4
|| ==7.10.3
|| ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
|| ==8.8.4
|| ==8.10.4
|| ==9.0.1

source-repository head
type: git
Expand Down Expand Up @@ -75,35 +85,42 @@ library
other-extensions:
BangPatterns
DeriveDataTypeable
Trustworthy

ghc-options: -Wall
build-depends:
base >=4.5 && <5
base >=4.5 && <5
, binary >=0.5.1
, containers >=0.1
, deepseq >=1.3
, hashable >=1.1.2
, integer-logarithms >=1
, primitive >=0.1
, text >=0.8
, containers >=0.4.2.1
, deepseq >=1.3.0.0
, hashable >=1.2.7.0
, integer-logarithms >=1.0.3.1
, primitive >=0.7.1.0
, text >=1.2.3.0

if flag(bytestring-builder)
build-depends:
bytestring >=0.9 && <0.10.4
, bytestring-builder >=0.10.4 && <0.11

else
build-depends: bytestring >=0.10.4
build-depends: bytestring >=0.10.4 && <0.12

if flag(integer-simple)
build-depends: integer-simple
if impl(ghc >=9.0)
build-depends: base >=4.15

if flag(integer-simple)
build-depends: invalid-cabal-flag-settings <0

else
build-depends: integer-gmp
if flag(integer-simple)
build-depends: integer-simple

else
build-depends: integer-gmp

hs-source-dirs: src
default-language: Haskell2010
other-extensions: Trustworthy

test-suite test-scientific
type: exitcode-stdio-1.0
Expand All @@ -112,25 +129,25 @@ test-suite test-scientific
default-language: Haskell2010
ghc-options: -Wall
build-depends:
base >=4.5 && <5
, binary >=0.4.1
, QuickCheck >=2.5
base
, binary
, QuickCheck >=2.14.2
, scientific
, smallcheck >=1.0
, tasty >=0.5
, tasty-ant-xml >=1.0
, tasty >=1.4.0.1
, tasty-ant-xml >=1.1.8
, tasty-hunit >=0.8
, tasty-quickcheck >=0.8
, tasty-smallcheck >=0.2
, text >=0.8
, text

if flag(bytestring-builder)
build-depends:
bytestring >=0.9 && <0.10.4
, bytestring-builder >=0.10.4 && <0.11
bytestring
, bytestring-builder

else
build-depends: bytestring >=0.10.4
build-depends: bytestring

benchmark bench-scientific
type: exitcode-stdio-1.0
Expand All @@ -139,6 +156,6 @@ benchmark bench-scientific
default-language: Haskell2010
ghc-options: -O2
build-depends:
base >=4.3 && <5
base
, criterion >=0.5
, scientific
5 changes: 5 additions & 0 deletions src/GHC/Integer/Compat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

module GHC.Integer.Compat (divInteger) where

#if MIN_VERSION_base(4,15,0)
import GHC.Integer (divInteger)
#else

#ifdef MIN_VERSION_integer_simple

#if MIN_VERSION_integer_simple(0,1,1)
Expand All @@ -21,3 +25,4 @@ divInteger = div
#endif

#endif
#endif

0 comments on commit 488cdfb

Please sign in to comment.