diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index 4123f66ff..56a5964da 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -83,6 +83,9 @@ library , HUnit , parsec , semigroups + if impl(ghc <7.6) + build-depends: + ghc-prim if flag(oldtime) build-depends: time <1.5 @@ -170,6 +173,9 @@ test-suite doctests , HUnit , doctest >=0.8 , Glob >=0.7 + if impl(ghc <7.6) + build-depends: + ghc-prim default-language: Haskell2010 test-suite hunittests @@ -208,6 +214,9 @@ test-suite hunittests , hledger-lib , test-framework , test-framework-hunit + if impl(ghc <7.6) + build-depends: + ghc-prim if flag(oldtime) build-depends: time <1.5 diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 4845f91e1..1448aebc5 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -118,6 +118,9 @@ library: - parsec - semigroups when: + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim - condition: flag(oldtime) then: dependencies: @@ -133,6 +136,10 @@ tests: dependencies: - doctest >=0.8 - Glob >=0.7 + when: + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim hunittests: main: hunittests.hs source-dirs: tests @@ -141,6 +148,9 @@ tests: - test-framework - test-framework-hunit when: + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim - condition: flag(oldtime) then: dependencies: diff --git a/hledger-web/hledger-web.cabal b/hledger-web/hledger-web.cabal index 8b40910a5..ffd6591ef 100644 --- a/hledger-web/hledger-web.cabal +++ b/hledger-web/hledger-web.cabal @@ -170,6 +170,9 @@ library else build-depends: time >=1.5 + if impl(ghc <7.6) + build-depends: + ghc-prim exposed-modules: Application Foundation @@ -247,6 +250,9 @@ executable hledger-web else build-depends: time >=1.5 + if impl(ghc <7.6) + build-depends: + ghc-prim default-language: Haskell2010 test-suite test @@ -302,4 +308,7 @@ test-suite test else build-depends: time >=1.5 + if impl(ghc <7.6) + build-depends: + ghc-prim default-language: Haskell2010 diff --git a/hledger-web/package.yaml b/hledger-web/package.yaml index d80223918..5496d8723 100644 --- a/hledger-web/package.yaml +++ b/hledger-web/package.yaml @@ -132,6 +132,9 @@ library: else: dependencies: - time >=1.5 + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim executables: hledger-web: main: main.hs @@ -157,6 +160,9 @@ executables: else: dependencies: - time >=1.5 + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim tests: test: main: main.hs @@ -175,5 +181,8 @@ tests: else: dependencies: - time >=1.5 + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim stability: stable tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0 diff --git a/hledger/hledger.cabal b/hledger/hledger.cabal index da59bae7d..894682caf 100644 --- a/hledger/hledger.cabal +++ b/hledger/hledger.cabal @@ -111,6 +111,9 @@ library , text >=0.11 , utf8-string >=0.3.5 && <1.1 , wizards ==1.0.* + if impl(ghc <7.6) + build-depends: + ghc-prim if impl(ghc >=7.10) build-depends: shakespeare >=2.0.2.2 && <2.1 @@ -192,6 +195,9 @@ executable hledger , wizards ==1.0.* if flag(threaded) ghc-options: -threaded + if impl(ghc <7.6) + build-depends: + ghc-prim if impl(ghc >=7.10) build-depends: shakespeare >=2.0.2.2 && <2.1 @@ -250,6 +256,9 @@ test-suite test , wizards ==1.0.* , test-framework , test-framework-hunit + if impl(ghc <7.6) + build-depends: + ghc-prim if impl(ghc >=7.10) build-depends: shakespeare >=2.0.2.2 && <2.1 diff --git a/hledger/package.yaml b/hledger/package.yaml index 63136d872..133bbea43 100644 --- a/hledger/package.yaml +++ b/hledger/package.yaml @@ -125,6 +125,9 @@ library: - utf8-string >=0.3.5 && <1.1 - wizards ==1.0.* when: + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim - condition: impl(ghc >=7.10) then: dependencies: @@ -173,6 +176,9 @@ executables: when: - condition: flag(threaded) ghc-options: -threaded + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim - condition: impl(ghc >=7.10) then: dependencies: @@ -221,6 +227,9 @@ tests: - test-framework - test-framework-hunit when: + - condition: impl(ghc <7.6) + dependencies: + - ghc-prim - condition: impl(ghc >=7.10) then: dependencies: