packages feed

genesis 0.0.1.0 → 0.1.0.0

raw patch · 5 files changed

+38/−25 lines, 5 filesdep +monad-io-adapterdep +transformersdep +transformers-basedep ~basedep ~directorydep ~envparsePVP ok

version bump matches the API change (PVP)

Dependencies added: monad-io-adapter, transformers, transformers-base

Dependency ranges changed: base, directory, envparse, monad-control, monad-persist, template-haskell, text-conversions

API changes (from Hackage documentation)

- Genesis.Persist: withPostgresqlConn :: (MonadBaseControl IO m, MonadLogger m, MonadIO m) => PostgresOptions -> (SqlBackend -> m a) -> m a
+ Genesis.Persist: withPostgresqlConn :: (MonadBaseControl IO m, MonadLogger m) => PostgresOptions -> (SqlBackend -> m a) -> m a
- Genesis.Persist: withPostgresqlPool :: (MonadBaseControl IO m, MonadLogger m, MonadIO m) => PostgresOptions -> Int -> (Pool SqlBackend -> m a) -> m a
+ Genesis.Persist: withPostgresqlPool :: (MonadBaseControl IO m, MonadLogger m) => PostgresOptions -> Int -> (Pool SqlBackend -> m a) -> m a
- Genesis.Persist.Base: withPostgresqlConn :: (MonadBaseControl IO m, MonadLogger m, MonadIO m) => PostgresOptions -> (SqlBackend -> m a) -> m a
+ Genesis.Persist.Base: withPostgresqlConn :: (MonadBaseControl IO m, MonadLogger m) => PostgresOptions -> (SqlBackend -> m a) -> m a
- Genesis.Persist.Base: withPostgresqlPool :: (MonadBaseControl IO m, MonadLogger m, MonadIO m) => PostgresOptions -> Int -> (Pool SqlBackend -> m a) -> m a
+ Genesis.Persist.Base: withPostgresqlPool :: (MonadBaseControl IO m, MonadLogger m) => PostgresOptions -> Int -> (Pool SqlBackend -> m a) -> m a

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## 0.1.0.0 (November 21st, 2017)++- Eliminated some unnecessary `MonadIO` constraints (since they are subsumed by `MonadBaseControl IO`).+ ## 0.0.1.0 (April 24th, 2017)  - Initial release
genesis.cabal view
@@ -1,9 +1,9 @@--- This file has been generated from package.yaml by hpack version 0.15.0.+-- This file has been generated from package.yaml by hpack version 0.18.1. -- -- see: https://github.com/sol/hpack  name:           genesis-version:        0.0.1.0+version:        0.1.0.0 synopsis:       Opinionated bootstrapping for Haskell web services. description:    Opinionated bootstrapping for Haskell web services. category:       Other@@ -30,25 +30,30 @@   default-extensions: ConstraintKinds DeriveGeneric DuplicateRecordFields FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving KindSignatures LambdaCase MultiParamTypeClasses NamedFieldPuns OverloadedStrings RankNTypes ScopedTypeVariables TypeApplications TypeOperators   ghc-options: -Wall   build-depends:-      base                   >= 4.9.0.0 && < 5-    , directory              >= 1.2.7.0-    , envparse               >= 0.3.0 && < 1+      base                   >= 4.9 && < 5+    , directory              >= 1.2.7+    , envparse               >= 0.3 && < 1     , file-embed             >= 0.0.10 && < 1     , filepath-    , monad-control          >= 1.0.0.0 && < 2+    , monad-control          >= 1 && < 2+    , monad-io-adapter       >= 0.1 && < 1     , monad-logger           >= 0.3.10-    , monad-persist          >= 0.0.1.0 && < 1+    , monad-persist          >= 0.0.1 && < 1     , persistent             >= 2.5 && < 3     , persistent-postgresql  >= 2.5 && < 3     , persistent-template    >= 2.5 && < 3     , resource-pool-    , template-haskell       >= 2.11.0.0 && < 2.12+    , template-haskell       >= 2.11 && < 2.13     , text-    , text-conversions       >= 0.2.0 && < 1+    , text-conversions       >= 0.2 && < 1+    , transformers+    , transformers-base   exposed-modules:       Genesis.Persist       Genesis.Persist.Base       Genesis.Persist.Migrate+  other-modules:+      Paths_genesis   default-language: Haskell2010  test-suite genesis-test-suite
library/Genesis/Persist/Base.hs view
@@ -18,7 +18,7 @@ import Control.Monad ((<=<)) import Control.Monad.Logger (MonadLogger) import Control.Monad.Trans.Control (MonadBaseControl)-import Control.Monad.IO.Class (MonadIO)+import Control.Monad.IO.Adapter (MonadIOAdapterT(..), adaptMonadIO) import Control.Monad.Persist (SqlBackend) import Data.Monoid ((<>)) import Data.Pool (Pool)@@ -57,19 +57,19 @@   Like 'PG.withPostgresqlPool' from "Database.Persist.Postgresql", except using   'PostgresOptions'. -}-withPostgresqlPool :: (MonadBaseControl IO m, MonadLogger m, MonadIO m)+withPostgresqlPool :: (MonadBaseControl IO m, MonadLogger m)                    => PostgresOptions -- ^ Options to connect to the database.                    -> Int -- ^ Number of connections to be kept open in the pool.                    -> (Pool SqlBackend -> m a) -- ^ Action to be executed that uses the connection pool.                    -> m a-withPostgresqlPool opts = PG.withPostgresqlPool (pgConnString opts)+withPostgresqlPool opts n f = adaptMonadIO (PG.withPostgresqlPool (pgConnString opts) n (MonadIOAdapterT . f))  {-|-Like 'PG.withPostgresqlConn' from "Database.Persist.Postgresql", except using-'PostgresOptions'.+  Like 'PG.withPostgresqlConn' from "Database.Persist.Postgresql", except using+  'PostgresOptions'. -}-withPostgresqlConn :: (MonadBaseControl IO m, MonadLogger m, MonadIO m) => PostgresOptions -> (SqlBackend -> m a) -> m a-withPostgresqlConn opts = PG.withPostgresqlConn (pgConnString opts)+withPostgresqlConn :: (MonadBaseControl IO m, MonadLogger m) => PostgresOptions -> (SqlBackend -> m a) -> m a+withPostgresqlConn opts f = adaptMonadIO (PG.withPostgresqlConn (pgConnString opts) (MonadIOAdapterT . f))  pgConnString :: PostgresOptions -> PG.ConnectionString pgConnString PostgresOptions { host, port, user, dbName, password } =
package.yaml view
@@ -1,5 +1,5 @@ name: genesis-version: 0.0.1.0+version: 0.1.0.0 category: Other synopsis: Opinionated bootstrapping for Haskell web services. description: Opinionated bootstrapping for Haskell web services.@@ -34,21 +34,24 @@  library:   dependencies:-  - base                   >= 4.9.0.0 && < 5-  - directory              >= 1.2.7.0-  - envparse               >= 0.3.0 && < 1+  - base                   >= 4.9 && < 5+  - directory              >= 1.2.7+  - envparse               >= 0.3 && < 1   - file-embed             >= 0.0.10 && < 1   - filepath-  - monad-control          >= 1.0.0.0 && < 2+  - monad-control          >= 1 && < 2+  - monad-io-adapter       >= 0.1 && < 1   - monad-logger           >= 0.3.10-  - monad-persist          >= 0.0.1.0 && < 1+  - monad-persist          >= 0.0.1 && < 1   - persistent             >= 2.5 && < 3   - persistent-postgresql  >= 2.5 && < 3   - persistent-template    >= 2.5 && < 3   - resource-pool-  - template-haskell       >= 2.11.0.0 && < 2.12+  - template-haskell       >= 2.11 && < 2.13   - text-  - text-conversions       >= 0.2.0 && < 1+  - text-conversions       >= 0.2 && < 1+  - transformers+  - transformers-base   source-dirs: library  tests:
stack.yaml view
@@ -2,7 +2,8 @@  packages: - '.'-extra-deps: [monad-persist-0.0.1.0]++extra-deps: [monad-io-adapter-0.1.0.0, monad-persist-0.0.1.0]  flags: {}