From d9b31f6361c7f1e605e73f22559eeb184ccda19f Mon Sep 17 00:00:00 2001 From: Christian Georgii Date: Tue, 16 Jun 2026 15:03:12 +0200 Subject: [PATCH] Support GHC 9.14 and semialign >= 1.4 GHC 9.14 moved binding type variables in constructor patterns from TypeApplications to the TypeAbstractions extension, so Rel8.Statement fails to compile with 'Illegal invisible type pattern'. Enable TypeAbstractions there. semialign 1.4 makes Unzip a superclass of Semialign, so the internal 'First' vectorizer newtype needs an Unzip instance. Also widen the base upper bound to < 4.23 to admit base 4.22 (GHC 9.14). --- changelog.d/20260616_150020_cgeorgii_support_ghc_9_14.md | 3 +++ rel8.cabal | 2 +- src/Rel8/Schema/HTable/Vectorize.hs | 8 ++++++-- src/Rel8/Statement.hs | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 changelog.d/20260616_150020_cgeorgii_support_ghc_9_14.md diff --git a/changelog.d/20260616_150020_cgeorgii_support_ghc_9_14.md b/changelog.d/20260616_150020_cgeorgii_support_ghc_9_14.md new file mode 100644 index 00000000..a42d0134 --- /dev/null +++ b/changelog.d/20260616_150020_cgeorgii_support_ghc_9_14.md @@ -0,0 +1,3 @@ +### Added + +- Support GHC-9.14 and `semialign >= 1.4`. diff --git a/rel8.cabal b/rel8.cabal index 8f053e3a..ccbd39c4 100644 --- a/rel8.cabal +++ b/rel8.cabal @@ -21,7 +21,7 @@ library build-depends: aeson , attoparsec - , base >= 4.16 && < 4.22 + , base >= 4.16 && < 4.23 , base16 >= 1.0 , base-compat >= 0.11 && < 0.15 , bifunctors diff --git a/src/Rel8/Schema/HTable/Vectorize.hs b/src/Rel8/Schema/HTable/Vectorize.hs index a0fc7ee3..0bfca2e0 100644 --- a/src/Rel8/Schema/HTable/Vectorize.hs +++ b/src/Rel8/Schema/HTable/Vectorize.hs @@ -67,7 +67,7 @@ import Rel8.Type.Information ( TypeInformation ) -- semialign import Data.Align (Semialign, alignWith) -import Data.Zip (Unzip, Zip, Zippy(..), zipWith) +import Data.Zip (Unzip, Zip, Zippy(..), unzipWith, zipWith) -- semigroupoids import Data.Functor.Apply (Apply) @@ -202,4 +202,8 @@ instance Semialign (First a) where instance Zip (First a) where - zipWith _ (First a) _ = First a \ No newline at end of file + zipWith _ (First a) _ = First a + + +instance Unzip (First a) where + unzipWith _ (First a) = (First a, First a) \ No newline at end of file diff --git a/src/Rel8/Statement.hs b/src/Rel8/Statement.hs index 713de7e7..6887a55b 100644 --- a/src/Rel8/Statement.hs +++ b/src/Rel8/Statement.hs @@ -8,6 +8,7 @@ {-# language RecordWildCards #-} {-# language ScopedTypeVariables #-} {-# language StandaloneKindSignatures #-} +{-# language TypeAbstractions #-} {-# language TypeApplications #-} module Rel8.Statement