[Git][ghc/ghc][wip/sjakobi/regression-tests-2] Add regression test for #14151
Simon Jakobi pushed to branch wip/sjakobi/regression-tests-2 at Glasgow Haskell Compiler / GHC Commits: 231a8a6b by Simon Jakobi at 2026-03-04T21:30:57+01:00 Add regression test for #14151 Closes #14151. - - - - - 2 changed files: - + testsuite/tests/typecheck/should_compile/T14151.hs - testsuite/tests/typecheck/should_compile/all.T Changes: ===================================== testsuite/tests/typecheck/should_compile/T14151.hs ===================================== @@ -0,0 +1,20 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE RankNTypes #-} +module T14151 where + +newtype HFix h a = HFix (h (HFix h) a) + +class EqForall f where + eqForall :: f a -> f a -> Bool + +class EqHetero h where + eqHetero :: (forall x. f x -> f x -> Bool) -> h f a -> h f a -> Bool + +instance EqHetero h => EqForall (HFix h) where + eqForall (HFix a) (HFix b) = eqHetero eqForall a b + +instance EqHetero h => Eq (HFix h a) where + (==) = eqForall ===================================== testsuite/tests/typecheck/should_compile/all.T ===================================== @@ -601,6 +601,7 @@ test('T13915b', expect_broken(15245), compile, ['']) test('T13984', normal, compile, ['']) test('T14128', normal, multimod_compile, ['T14128Main', '-v0']) test('T14149', normal, compile_fail, ['']) +test('T14151', normal, compile, ['']) test('T14154', normal, compile, ['']) test('T14158', normal, compile, ['']) test('T13943', normal, compile, ['-fsolve-constant-dicts']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/231a8a6b8dbf87af954596b8e3da55ce... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/231a8a6b8dbf87af954596b8e3da55ce... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)