From 911699172e3ba4878733add9a14ff36cf95fc990 Mon Sep 17 00:00:00 2001 From: John Ky Date: Sat, 17 Oct 2020 21:03:13 +1100 Subject: [PATCH] Update to generic-lens-2 --- .circleci/config.yml | 51 +++++++++++++++++++++----------------- arbor-postgres.cabal | 2 +- src/Arbor/Postgres/Core.hs | 2 +- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b08e53f..fd15f35 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,49 +1,55 @@ version: 2.1 orbs: - haskell: haskell-works/haskell-build@4.0.2 - github: haskell-works/github-release@1.2.1 - hackage: haskell-works/hackage@1.0.0 + haskell: haskell-works/haskell-build@4.1.8 + hlint: haskell-works/hlint@1.0.1 + github: haskell-works/github-release@1.3.3 + hackage: haskell-works/hackage@1.4.2 + merge-point: haskell-works/merge-point@1.0.0 workflows: multiple-ghc-build: jobs: - haskell/build-with-binary-cache: - name: GHC 8.2.2 - executor: haskell/ghc-8_2_2 + name: GHC 8.6.5 + executor: haskell/ghc-8_6_5 context: haskell-ci + binary-cache-uri: ${BINARY_CACHE_URI-"http://cache.haskellworks.io/archive"} cabal-build-extra: --write-ghc-environment-files=ghc8.4.4+ - cabal-test-extra: --test-show-details=direct + cabal-test-extra: --test-show-details=direct --test-options='+RTS -g1' - haskell/build-with-binary-cache: - name: GHC 8.4.4 - executor: haskell/ghc-8_4_4 + name: GHC 8.8.3 + executor: haskell/ghc-8_8_3 context: haskell-ci + binary-cache-uri: ${BINARY_CACHE_URI-"http://cache.haskellworks.io/archive"} cabal-build-extra: --write-ghc-environment-files=ghc8.4.4+ - cabal-test-extra: --test-show-details=direct + cabal-test-extra: --test-show-details=direct --test-options='+RTS -g1' - haskell/build-with-binary-cache: - name: GHC 8.6.5 - executor: haskell/ghc-8_6_5 + name: GHC 8.10.2 + executor: haskell/ghc-8_10_2 context: haskell-ci + binary-cache-uri: ${BINARY_CACHE_URI-"http://cache.haskellworks.io/archive"} cabal-build-extra: --write-ghc-environment-files=ghc8.4.4+ - cabal-test-extra: --test-show-details=direct + cabal-test-extra: --test-show-details=direct --test-options='+RTS -g1' - - haskell/build-with-binary-cache: - name: GHC 8.8.1 - executor: haskell/ghc-8_8_1 - context: haskell-ci - cabal-build-extra: --write-ghc-environment-files=ghc8.4.4+ - cabal-test-extra: --test-show-details=direct + - hlint/hlint: + name: Hlint + + - merge-point/merge-point: + name: Build Ok + requires: + - GHC 8.6.5 + - GHC 8.8.3 + - GHC 8.10.2 + - Hlint - github/release-cabal: name: GitHub Release context: haskell-ci requires: - - GHC 8.2.2 - - GHC 8.4.4 - - GHC 8.6.5 - - GHC 8.8.1 + - Build Ok checkout: true filters: branches: @@ -56,4 +62,3 @@ workflows: - GitHub Release username: ${HACKAGE_USER} password: ${HACKAGE_PASS} - diff --git a/arbor-postgres.cabal b/arbor-postgres.cabal index 35587e2..f755b73 100644 --- a/arbor-postgres.cabal +++ b/arbor-postgres.cabal @@ -24,7 +24,7 @@ source-repository head common base { build-depends: base >= 4.7 && < 5 } common bytestring { build-depends: bytestring >= 0.10 && < 0.11 } -common generic-lens { build-depends: generic-lens >= 1.2.0.1 && < 2 } +common generic-lens { build-depends: generic-lens >= 1.2.0.1 && < 3 } common lens { build-depends: lens >= 4.16 && < 5 } common network-uri { build-depends: network-uri >= 2.6 && < 3 } common optparse-applicative { build-depends: optparse-applicative >= 0.14 && < 0.16 } diff --git a/src/Arbor/Postgres/Core.hs b/src/Arbor/Postgres/Core.hs index 36872d5..a10dc98 100644 --- a/src/Arbor/Postgres/Core.hs +++ b/src/Arbor/Postgres/Core.hs @@ -61,5 +61,5 @@ mkConnectionString config = do mkResourceURI :: URI -> Table -> [(T.Text, T.Text)] -> URI mkResourceURI uri (Table tbl) kvs = do - let q = "?" <> T.intercalate "&" (uncurry (\k v -> k <> "=" <> v) <$> (("table", tbl) : kvs)) & T.unpack + let q = "?" <> T.intercalate "&" ((\(k, v) -> k <> "=" <> v) <$> (("table", tbl) : kvs)) & T.unpack uri { uriQuery = q }