hasql-optparse-applicative 0.4.0.1 → 0.5
raw patch · 2 files changed
+18/−10 lines, 2 filesdep ~hasqldep ~hasql-pooldep ~optparse-applicativePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hasql, hasql-pool, optparse-applicative
API changes (from Hackage documentation)
Files
hasql-optparse-applicative.cabal view
@@ -1,7 +1,7 @@ name: hasql-optparse-applicative version:- 0.4.0.1+ 0.5 synopsis: "optparse-applicative" parsers for "hasql" category:@@ -44,9 +44,9 @@ exposed-modules: Hasql.OptparseApplicative build-depends:- hasql >= 1.3 && < 1.7,- hasql-pool >= 0.7 && < 0.8,+ hasql >= 1.6 && < 1.7,+ hasql-pool >= 0.8 && < 0.9, -- - optparse-applicative >= 0.12 && < 0.18,+ optparse-applicative >= 0.17 && < 0.18, -- base-prelude < 2
library/Hasql/OptparseApplicative.hs view
@@ -12,14 +12,22 @@ -- if you don't want it changed. poolSettings :: (String -> String) -> Parser (IO B.Pool) poolSettings updatedName =- B.acquire <$> size <*> connectionSettings updatedName+ B.acquire <$> size <*> acquisitionTimeout <*> connectionSettings updatedName where size =- option auto $- long (updatedName "pool-size")- <> value 1- <> showDefault- <> help "Amount of connections in the pool"+ option auto . mconcat $+ [ long (updatedName "pool-size"),+ value 1,+ showDefault,+ help "Amount of connections in the pool"+ ]+ acquisitionTimeout =+ optional . fmap (* 1000000) . option auto . mconcat $+ [ long (updatedName "pool-acquisition-timeout"),+ value 10,+ showDefault,+ help "How long it takes until the attempt to connect is considered timed out. In seconds"+ ] -- | Given a function, which updates the long names produces a parser -- of @Hasql.Connection.'A.Settings'@.