diff --git a/.travis.yml b/.travis.yml index f72133b..0655e70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ addons: env: - GHCVER=8.2 - GHCVER=8.4 + - GHCVER=8.6 install: - export STACK_YAML=stack-$GHCVER.yaml diff --git a/esqueleto.cabal b/esqueleto.cabal index 60d42d0..1a7aab9 100644 --- a/esqueleto.cabal +++ b/esqueleto.cabal @@ -1,8 +1,10 @@ --- This file has been generated from package.yaml by hpack version 0.20.0. +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.31.0. -- -- see: https://github.com/sol/hpack -- --- hash: 34b1b8836c9ae7acb038d0e808674ddb4c2ab696d37e5b117f61acad02ed6daf +-- hash: e6538d431870626b3bae78c5b1550ed237765c220c20c8eecd207e4dcd901a16 name: esqueleto version: 2.6.0 @@ -22,7 +24,6 @@ copyright: (c) 2012-2016 Felipe Almeida Lessa license: BSD3 license-file: LICENSE build-type: Simple -cabal-version: >= 1.10 source-repository head type: git @@ -37,7 +38,7 @@ library , bytestring , conduit >=1.3 , monad-logger - , persistent >=2.8.0 && <2.9 + , persistent >=2.8.0 && <2.10 , resourcet >=1.2 , tagged >=0.2 , text >=0.11 && <1.3 @@ -78,7 +79,7 @@ test-suite mysql , monad-logger , mysql , mysql-simple - , persistent >=2.8.0 && <2.9 + , persistent >=2.8.0 && <2.10 , persistent-mysql , persistent-template , resourcet >=1.2 @@ -108,7 +109,7 @@ test-suite postgresql , esqueleto , hspec , monad-logger - , persistent >=2.8.0 && <2.9 + , persistent >=2.8.0 && <2.10 , persistent-postgresql , persistent-template , postgresql-libpq @@ -140,7 +141,7 @@ test-suite sqlite , esqueleto , hspec , monad-logger - , persistent >=2.8.0 && <2.9 + , persistent >=2.8.0 && <2.10 , persistent-sqlite , persistent-template , resourcet >=1.2 diff --git a/package.yaml b/package.yaml index 6a0d565..c7a24fa 100644 --- a/package.yaml +++ b/package.yaml @@ -48,7 +48,7 @@ dependencies: - bytestring - conduit >=1.3 - monad-logger - - persistent >=2.8.0 && <2.9 + - persistent >=2.8.0 && <2.10 - resourcet >=1.2 - tagged >=0.2 - text >=0.11 && <1.3 diff --git a/stack-8.4.yaml b/stack-8.4.yaml index 7bbfbb3..05e9eae 100644 --- a/stack-8.4.yaml +++ b/stack-8.4.yaml @@ -5,5 +5,5 @@ packages: extra-deps: - persistent-postgresql-2.8.2.0 -- postgresql-simple-0.5.3.0 +- postgresql-simple-0.5.4.0 allow-newer: true diff --git a/stack-8.6.yaml b/stack-8.6.yaml new file mode 100644 index 0000000..6514933 --- /dev/null +++ b/stack-8.6.yaml @@ -0,0 +1,5 @@ +# TODO: switch resolver to lts-13.x once that is released +resolver: nightly-2018-12-05 + +packages: +- '.' diff --git a/test/Common/Test.hs b/test/Common/Test.hs index 06e8426..a513a29 100644 --- a/test/Common/Test.hs +++ b/test/Common/Test.hs @@ -1,6 +1,7 @@ {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} {-# LANGUAGE ConstraintKinds + , CPP , EmptyDataDecls , FlexibleContexts , FlexibleInstances @@ -49,6 +50,9 @@ module Common.Test ) where import Control.Monad (forM_, replicateM, replicateM_, void) +#if __GLASGOW_HASKELL__ >= 806 +import Control.Monad.Fail (MonadFail) +#endif import Control.Monad.IO.Class (MonadIO(liftIO)) import Control.Monad.Logger (MonadLogger (..), NoLoggingT, runNoLoggingT) import Control.Monad.Trans.Reader (ReaderT) @@ -1401,7 +1405,11 @@ type RunDbMonad m = ( MonadUnliftIO m , MonadLogger m , MonadThrow m ) -type Run = forall a. (forall m. RunDbMonad m => SqlPersistT (R.ResourceT m) a) -> IO a +#if __GLASGOW_HASKELL__ >= 806 +type Run = forall a. (forall m. (RunDbMonad m, MonadFail m) => SqlPersistT (R.ResourceT m) a) -> IO a +#else +type Run = forall a. (forall m. (RunDbMonad m) => SqlPersistT (R.ResourceT m) a) -> IO a +#endif type WithConn m a = RunDbMonad m => (SqlBackend -> R.ResourceT m a) -> m a