Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ['9.4', '9.6', '9.8']
ghc: ['9.4', '9.6', '9.8', '9.10', '9.12']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
Expand All @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ['9.4', '9.6', '9.8']
ghc: ['9.4', '9.6', '9.8', '9.10', '9.12']
os: [ubuntu-latest]
project:
- aws-checkip
Expand Down
5 changes: 4 additions & 1 deletion aws-checkip/aws-checkip.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -16,6 +16,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
5 changes: 4 additions & 1 deletion aws-rds/aws-rds.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -16,6 +16,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12
extra-source-files:
global-bundle.pem

Expand Down
5 changes: 4 additions & 1 deletion aws-secrets/aws-secrets.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -16,6 +16,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
5 changes: 4 additions & 1 deletion aws-temporary-ingress-rule/aws-temporary-ingress-rule.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -16,6 +16,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
5 changes: 4 additions & 1 deletion bounded/bounded.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -18,6 +18,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
2 changes: 1 addition & 1 deletion bounded/src/Data/Bounded/Integral.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import qualified Language.Haskell.TH.Syntax as TH
newtype BoundNumber' (integral :: Type) (label :: Symbol) (range :: (Nat, Nat))
= BoundNumber { unBoundNumber :: integral }
deriving newtype (JSON.ToJSON)
deriving stock (Eq, Ord, Show, TH.Lift, Typeable)
deriving stock (Eq, Ord, Show, TH.Lift)

type BoundNumber = BoundNumber' Natural

Expand Down
2 changes: 1 addition & 1 deletion bounded/src/Data/Bounded/Text.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type BoundText (label :: Symbol) = BoundText' label '(1, 128)
newtype BoundText' (a :: k) (range :: (Nat, Nat)) = BoundText Text
deriving (Conversion Text) via Text
deriving newtype (JSON.FromJSONKey, JSON.ToJSON, JSON.ToJSONKey)
deriving stock (Eq, Ord, Show, TH.Lift, Typeable)
deriving stock (Eq, Ord, Show, TH.Lift)

data BoundTextError = BoundTextError
{ actual :: Natural
Expand Down
1 change: 0 additions & 1 deletion bounded/test/Test/TypedSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Test.TypeSpec.Core

newtype TypeSpecTasty expectation = TypeSpecTasty (TypeSpec expectation)
deriving newtype Show
deriving stock Typeable

instance (PrettyTypeSpec a, Typeable (TypeSpecTasty a)) => IsTest (TypeSpecTasty a) where
run _ (TypeSpecTasty assertion) _ = pure $ case assertion of
Expand Down
5 changes: 4 additions & 1 deletion cbt/cbt.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -18,6 +18,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
5 changes: 4 additions & 1 deletion cli-utils/cli-utils.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -16,6 +16,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
3 changes: 3 additions & 0 deletions common/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
tested-with:
- GHC == 9.4
- GHC == 9.6
- GHC == 9.8
- GHC == 9.10
- GHC == 9.12

when:
- condition: flag(development)
Expand Down
5 changes: 4 additions & 1 deletion conversions/conversions.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -17,6 +17,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
1 change: 0 additions & 1 deletion conversions/src/Data/Conversions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ instance Show.Show (BoundError a b) where
instance (Typeable a, Typeable b) => Exception (BoundError a b)

data UserBoundError a b = UserBoundError a b b
deriving stock (Typeable)

instance (Show a, Show b) => Show.Show (UserBoundError a b) where
show (UserBoundError value min max) = boundError value min max
Expand Down
5 changes: 4 additions & 1 deletion dbt/dbt.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -17,6 +17,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
33 changes: 29 additions & 4 deletions dbt/src/DBT/Connection.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
module DBT.Connection
( toSettings
, withConnection
Expand All @@ -14,6 +15,10 @@ import qualified Data.Maybe as Maybe
import qualified Data.Text as Text
import qualified Data.Text.Encoding as Text
import qualified Hasql.Connection as Hasql
#if MIN_VERSION_hasql(1,9,0)
import qualified Hasql.Connection.Setting as HasqlSetting
import qualified Hasql.Connection.Setting.Connection as HasqlConnection
#endif
import qualified Hasql.Session as Hasql
import qualified UnliftIO.Exception as Exception

Expand Down Expand Up @@ -49,9 +54,28 @@ withConnectionSession config session
= withConnection config
$ either Exception.throwIO pure <=< (liftIO . Hasql.run session)

toSettings :: ClientConfig -> Hasql.Settings
#if MIN_VERSION_hasql(1,9,0)
toSettings :: ClientConfig -> [HasqlSetting.Setting]
toSettings config@ClientConfig{..}
= render
= [HasqlSetting.connection $ HasqlConnection.string $ Text.decodeUtf8 $ renderToByteString
[ required "dbname" databaseName
, required "host" hostName
, required "port" (effectiveHostPort config)
, required "user" userName
, optional "password" password
, optional "sslmode" sslMode
, optional "sslrootcert" sslRootCert
]]
where
required :: ToText a => Text -> a -> Maybe Parameter
required name = pure . Parameter name . toText

optional :: ToText a => Text -> Maybe a -> Maybe Parameter
optional name value = Parameter name . toText <$> value
#else
toSettings :: ClientConfig -> BS.ByteString
toSettings config@ClientConfig{..}
= renderToByteString
[ required "dbname" databaseName
, required "host" hostName
, required "port" (effectiveHostPort config)
Expand All @@ -66,9 +90,10 @@ toSettings config@ClientConfig{..}

optional :: ToText a => Text -> Maybe a -> Maybe Parameter
optional name value = Parameter name . toText <$> value
#endif

render :: [Maybe Parameter] -> BS.ByteString
render parameters
renderToByteString :: [Maybe Parameter] -> BS.ByteString
renderToByteString parameters
= Text.encodeUtf8
. Text.intercalate " "
$ renderParameter <$> Maybe.catMaybes parameters
Expand Down
5 changes: 4 additions & 1 deletion devtools/devtools.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.18

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -21,6 +21,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12
extra-doc-files:
README.md

Expand Down
2 changes: 0 additions & 2 deletions devtools/src/Devtools/HLint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module Devtools.HLint (testTree) where
import Control.Applicative (empty, pure)
import Data.Function (($), (.), const)
import Data.Functor (void)
import Data.Typeable (Typeable)
import System.IO

import qualified Data.Foldable as Foldable
Expand All @@ -14,7 +13,6 @@ import qualified Test.Tasty.Providers as Tasty
import qualified Test.Tasty.Providers.ConsoleFormat as Tasty

data HLintTest = HLintTest
deriving stock Typeable

instance Tasty.IsTest HLintTest where
run _options HLintTest _callback = runHLintTest
Expand Down
5 changes: 4 additions & 1 deletion http-mclient/http-mclient.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -20,6 +20,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12
extra-source-files:
README.md

Expand Down
5 changes: 4 additions & 1 deletion lambda-alb/lambda-alb.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -20,6 +20,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12
extra-source-files:
README.md

Expand Down
5 changes: 4 additions & 1 deletion lambda-runtime/lambda-runtime.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -20,6 +20,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12
extra-source-files:
README.md

Expand Down
5 changes: 4 additions & 1 deletion lht/lht.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

Expand All @@ -18,6 +18,9 @@ build-type: Simple
tested-with:
GHC == 9.4
, GHC == 9.6
, GHC == 9.8
, GHC == 9.10
, GHC == 9.12

source-repository head
type: git
Expand Down
Loading
Loading