Building with GHC 9.4

This commit is contained in:
Tom McLaughlin 2023-03-15 22:10:06 -07:00
parent c71a06bbf7
commit 0ff67a3061
5 changed files with 22 additions and 11 deletions

View File

@ -4,6 +4,7 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE CPP #-}
module Main where
@ -11,6 +12,7 @@ import Control.Concurrent
import Control.Exception.Lifted
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.IO.Unlift
import Data.Maybe
import Data.Pool
import Data.String.Interpolate
@ -48,8 +50,15 @@ claimWebdriver spec = introduceWith' (
where
wrappedAction action = do
pool <- getContext webDriverPool
#if !MIN_VERSION_resource_pool(3,0,0)
withRunInIO $ \runInIO ->
withResource pool $ \sess ->
runInIO $ (void $ action sess) `finally` closeAllSessions sess
#else
withResource pool $ \sess ->
(void $ action sess) `finally` closeAllSessions sess
#endif
-- * Tests

View File

@ -1,6 +1,6 @@
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.34.4.
-- This file has been generated from package.yaml by hpack version 0.35.1.
--
-- see: https://github.com/sol/hpack
@ -36,5 +36,6 @@ executable demo-webdriver-pool
, sandwich-webdriver
, string-interpolate
, time
, unliftio-core
, webdriver
default-language: Haskell2010

View File

@ -12,6 +12,7 @@ dependencies:
- sandwich-webdriver
- string-interpolate
- time
- unliftio-core
- webdriver
default-extensions:

View File

@ -1,5 +1,5 @@
resolver: lts-19.22
resolver: nightly-2023-03-15
packages:
- ./sandwich

View File

@ -5,19 +5,19 @@
packages:
- completed:
commit: 6ea8952a1ed009ae949063ceb3d98bb4f5176dec
git: https://github.com/codedownio/hs-webdriver
name: webdriver
version: 0.9.0.1
git: https://github.com/codedownio/hs-webdriver
pantry-tree:
size: 3059
sha256: 0be59abfbfa9de2fb8d80b73f2a12ef051dc1d2c4bce373eafc68b7e07cee964
commit: 6ea8952a1ed009ae949063ceb3d98bb4f5176dec
size: 3059
version: 0.9.0.1
original:
git: https://github.com/codedownio/hs-webdriver
commit: 6ea8952a1ed009ae949063ceb3d98bb4f5176dec
git: https://github.com/codedownio/hs-webdriver
snapshots:
- completed:
size: 619399
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/22.yaml
sha256: 5098594e71bdefe0c13e9e6236f12e3414ef91a2b89b029fd30e8fc8087f3a07
original: lts-19.22
sha256: c547ded280cb8518065c1c09523faaf2a61e7af4c633ae5de8d657284d87666b
size: 599236
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2023/3/15.yaml
original: nightly-2023-03-15