From 7635f56a5ca30ad2360cf685da4e7657b55683b3 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 12 Mar 2018 23:27:23 +0000 Subject: [PATCH] lib: add conditional dep to package.yaml and rest of cabal file --- hledger-lib/hledger-lib.cabal | 16 +++++++++++++--- hledger-lib/package.yaml | 5 +++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index 1a9e20f80..57b939716 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -2,7 +2,7 @@ -- -- see: https://github.com/sol/hpack -- --- hash: 0dda6f4ef72b1a815284abd47c8dfefe75812e2e91900581bd7837dd587533d4 +-- hash: 9878d76090f5076d1d95f3f77f92ef1683e98b5567dfcd1613a225f85ece8dfe name: hledger-lib version: 1.5.99 @@ -84,8 +84,9 @@ library , transformers >=0.2 , uglymemo , utf8-string >=0.3.5 - if !impl(ghc >= 8.0) - build-depends: semigroups == 0.18.* + if (!impl(ghc >= 8.0)) + build-depends: + semigroups ==0.18.* exposed-modules: Hledger Hledger.Data @@ -177,6 +178,9 @@ test-suite doctests , transformers >=0.2 , uglymemo , utf8-string >=0.3.5 + if (!impl(ghc >= 8.0)) + build-depends: + semigroups ==0.18.* other-modules: Hledger Hledger.Data @@ -267,6 +271,9 @@ test-suite easytests , transformers >=0.2 , uglymemo , utf8-string >=0.3.5 + if (!impl(ghc >= 8.0)) + build-depends: + semigroups ==0.18.* other-modules: Hledger Hledger.Data @@ -358,6 +365,9 @@ test-suite hunittests , transformers >=0.2 , uglymemo , utf8-string >=0.3.5 + if (!impl(ghc >= 8.0)) + build-depends: + semigroups ==0.18.* other-modules: Hledger Hledger.Data diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 034b7b7ad..570f459a9 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -76,6 +76,11 @@ dependencies: #- system-filepath #- trifecta >=0.91 +when: +- condition: (!impl(ghc >= 8.0)) + dependencies: + - semigroups == 0.18.* + ghc-options: - -Wall - -fno-warn-unused-do-bind