diff --git a/beam-core/beam-core.cabal b/beam-core/beam-core.cabal index c7c5c437..45b3d26c 100644 --- a/beam-core/beam-core.cabal +++ b/beam-core/beam-core.cabal @@ -84,8 +84,13 @@ library DefaultSignatures, KindSignatures, MultiParamTypeClasses, DeriveGeneric, DeriveFunctor, DeriveDataTypeable, TypeApplications, FunctionalDependencies, DataKinds, BangPatterns, InstanceSigs ghc-options: -Wall + -Widentities + -Wincomplete-uni-patterns + -Wincomplete-record-updates if impl(ghc >= 8.8) ghc-options: -Wcompat + if impl(ghc >= 8.10) + ghc-options: -Wunused-packages if flag(werror) ghc-options: -Werror if impl(ghc >= 8.10) diff --git a/beam-migrate/ChangeLog.md b/beam-migrate/ChangeLog.md index e2e92d18..fdf0f87c 100644 --- a/beam-migrate/ChangeLog.md +++ b/beam-migrate/ChangeLog.md @@ -1,3 +1,9 @@ +# Unreleased + +## Dependencies + +* Removed explicit dependency on `ghc-prim`, which was not used directly. + # 0.5.3.1 ## Bug fixes @@ -18,7 +24,7 @@ # 0.5.2.0 -## Addded features +## Added features * `IN (SELECT ...)` syntax via `inSelectE` diff --git a/beam-migrate/Database/Beam/Migrate/Actions.hs b/beam-migrate/Database/Beam/Migrate/Actions.hs index d39613ef..8c5d4174 100644 --- a/beam-migrate/Database/Beam/Migrate/Actions.hs +++ b/beam-migrate/Database/Beam/Migrate/Actions.hs @@ -440,7 +440,7 @@ addColumnProvider = pure (PotentialAction mempty (HS.fromList ([SomeDatabasePredicate colP] ++ constraintsP)) (Seq.singleton (MigrationCommand cmd MigrationKeepsData)) ("Add column " <> colNm <> " to " <> qnameAsText tblNm) - (addColumnWeight + fromIntegral (T.length (qnameAsText tblNm) + T.length colNm))) + (addColumnWeight + (T.length (qnameAsText tblNm) + T.length colNm))) -- | Action provider for SQL92 @ALTER TABLE ... DROP COLUMN ...@ actions dropColumnProvider :: forall be @@ -469,7 +469,7 @@ dropColumnProvider = ActionProvider provider pure (PotentialAction (HS.fromList (SomeDatabasePredicate colP:relatedPreds)) mempty (Seq.singleton (MigrationCommand cmd MigrationLosesData)) ("Drop column " <> colNm <> " from " <> qnameAsText tblNm) - (dropColumnWeight + fromIntegral (T.length (qnameAsText tblNm) + T.length colNm))) + (dropColumnWeight + (T.length (qnameAsText tblNm) + T.length colNm))) -- | Action provider for SQL92 @ALTER TABLE ... ALTER COLUMN ... SET NULL@ addColumnNullProvider :: forall be diff --git a/beam-migrate/beam-migrate.cabal b/beam-migrate/beam-migrate.cabal index dd113d30..02766a40 100644 --- a/beam-migrate/beam-migrate.cabal +++ b/beam-migrate/beam-migrate.cabal @@ -69,7 +69,6 @@ library microlens >=0.4 && <0.5, parallel >=3.2 && <3.3, deepseq >=1.4 && <1.7, - ghc-prim >=0.5 && <0.14, haskell-src-exts >=1.18 && <1.24, pretty >=1.1 && <1.2, dependent-map >=0.2 && <0.5, @@ -82,8 +81,13 @@ library FlexibleInstances, TypeOperators, TypeApplications, MultiParamTypeClasses, DataKinds, DeriveGeneric ghc-options: -Wall + -Widentities + -Wincomplete-uni-patterns + -Wincomplete-record-updates if flag(werror) ghc-options: -Werror + if impl(ghc >= 8.10) + ghc-options: -Wunused-packages flag werror description: Enable -Werror during development diff --git a/beam-postgres/beam-postgres.cabal b/beam-postgres/beam-postgres.cabal index 63dee40f..df228051 100644 --- a/beam-postgres/beam-postgres.cabal +++ b/beam-postgres/beam-postgres.cabal @@ -66,6 +66,11 @@ library DeriveDataTypeable, DeriveGeneric, StandaloneDeriving, TypeFamilies, GADTs, OverloadedStrings, CPP, TypeApplications, FlexibleContexts ghc-options: -Wall + -Widentities + -Wincomplete-uni-patterns + -Wincomplete-record-updates + if impl(ghc >= 8.10) + ghc-options: -Wunused-packages if flag(werror) ghc-options: -Werror diff --git a/beam-sqlite/Database/Beam/Sqlite/Syntax.hs b/beam-sqlite/Database/Beam/Sqlite/Syntax.hs index 0c117ca2..0e681fda 100644 --- a/beam-sqlite/Database/Beam/Sqlite/Syntax.hs +++ b/beam-sqlite/Database/Beam/Sqlite/Syntax.hs @@ -710,7 +710,7 @@ instance HasSqlValueSyntax SqliteValueSyntax Int16 where instance HasSqlValueSyntax SqliteValueSyntax Int32 where sqlValueSyntax i = SqliteValueSyntax (emitValue (SQLInteger (fromIntegral i))) instance HasSqlValueSyntax SqliteValueSyntax Int64 where - sqlValueSyntax i = SqliteValueSyntax (emitValue (SQLInteger (fromIntegral i))) + sqlValueSyntax i = SqliteValueSyntax (emitValue (SQLInteger i)) instance HasSqlValueSyntax SqliteValueSyntax Word8 where sqlValueSyntax i = SqliteValueSyntax (emitValue (SQLInteger (fromIntegral i))) instance HasSqlValueSyntax SqliteValueSyntax Word16 where diff --git a/beam-sqlite/beam-sqlite.cabal b/beam-sqlite/beam-sqlite.cabal index 4bd56f25..5a30ac07 100644 --- a/beam-sqlite/beam-sqlite.cabal +++ b/beam-sqlite/beam-sqlite.cabal @@ -47,8 +47,13 @@ library DeriveDataTypeable, DeriveGeneric, StandaloneDeriving, TypeFamilies, GADTs, OverloadedStrings, CPP, TypeApplications, FlexibleContexts, ConstraintKinds, DerivingStrategies ghc-options: -Wall + -Widentities + -Wincomplete-uni-patterns + -Wincomplete-record-updates + if impl(ghc >= 8.10) + ghc-options: -Wunused-packages if flag(werror) - ghc-options: -Werror + ghc-options: -Werror test-suite beam-sqlite-tests type: exitcode-stdio-1.0