diff --git a/hegg.cabal b/hegg.cabal
index 3f6f9d8..e066481 100644
--- a/hegg.cabal
+++ b/hegg.cabal
@@ -46,6 +46,13 @@ source-repository head
location: https://github.com/alt-romes/hegg
library
+ other-extensions: BlockArguments StandaloneKindSignatures
+
+ -- QuantifiedConstraints are quite broken with GHC-9.0
+ -- Ord (Pattern l) instance triggers same issue like
+ -- https://github.com/haskell/mtl/issues/138
+ build-depends: base >=4.16 || <4.15
+
ghc-options: -Wall -Wcompat
-- -fno-prof-auto
@@ -91,7 +98,8 @@ library
-- other-modules:
-- LANGUAGE extensions used by modules in this package.
- build-depends: base >= 4.4 && < 5,
+ -- base-4.13, because foldMap' is used.
+ build-depends: base >= 4.13 && < 5,
transformers >= 0.4 && < 0.7,
containers >= 0.4 && < 0.7
if flag(vizdot)
Due foldMap' definition you need at least GHC-8.10. StandaloneKindSignatures need GHC-8.8 IIRC.
The quantified constraints bug is unfortunate, but it's there to stay.
diff --git a/src/Data/Equality/Matching/Pattern.hs b/src/Data/Equality/Matching/Pattern.hs
index 3711831..41ac5b8 100644
--- a/src/Data/Equality/Matching/Pattern.hs
+++ b/src/Data/Equality/Matching/Pattern.hs
@@ -77,12 +77,12 @@ data Pattern lang
pat :: lang (Pattern lang) -> Pattern lang
pat = NonVariablePattern
-instance (∀ a. Eq a => Eq (l a)) => (Eq (Pattern l)) where
+instance (Eq (lang (Pattern lang))) => (Eq (Pattern lang)) where
(==) (NonVariablePattern a) (NonVariablePattern b) = (==) a b
(==) (VariablePattern a) (VariablePattern b) = a == b
(==) _ _ = False
-instance (∀ a. Eq a => Eq (l a), ∀ a. (Ord a) => Ord (l a)) => (Ord (Pattern l)) where
+instance (Ord (lang (Pattern lang))) => (Ord (Pattern lang)) where
compare (VariablePattern _) (NonVariablePattern _) = LT
compare (NonVariablePattern _) (VariablePattern _) = GT
compare (VariablePattern a) (VariablePattern b) = compare a b
is an option to restore GHC-9.0 support, by simply not using QuantifiedConstraints.
I see you have CI setup, but as you test only with GHC-8.10.7, the base bound indeed should be updated to >=4.13. You skip 9.0 in CI, but your bounds allow it.
We drop support for 9.0.2 because quantified constraints seems buggy,
or at least the ones we use don't compile successfully in 9.0.2
If you do so, please update your bounds too. tested-with is only an informative field, it doesn't constraint cabal-install solver e.g.
I made a revision:
Due
foldMap'
definition you need at least GHC-8.10. StandaloneKindSignatures need GHC-8.8 IIRC.The quantified constraints bug is unfortunate, but it's there to stay.
is an option to restore GHC-9.0 support, by simply not using QuantifiedConstraints.
I see you have CI setup, but as you test only with GHC-8.10.7, the
base
bound indeed should be updated to>=4.13
. You skip 9.0 in CI, but your bounds allow it.If you do so, please update your bounds too.
tested-with
is only an informative field, it doesn't constraintcabal-install
solver e.g.