diff --git a/testsuite/tests/quantified-constraints/T22238.hs b/testsuite/tests/quantified-constraints/T22238.hs new file mode 100644 index 0000000000000000000000000000000000000000..6192554ede7240909abd594717b1f4fd0ec9441c --- /dev/null +++ b/testsuite/tests/quantified-constraints/T22238.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE ImpredicativeTypes #-} +{-# LANGUAGE GADTs #-} + +module T22238 where + +import Data.Kind (Constraint) + +data Dict (c :: Constraint) where + MkDict :: c => Dict c + +forallListEqDict :: Dict (forall a. Eq a => Eq [a]) +forallListEqDict = MkDict diff --git a/testsuite/tests/quantified-constraints/all.T b/testsuite/tests/quantified-constraints/all.T index 1df950fa0e3c99dc9f207b20d81a35618b5ed7fa..c3235a48d98767f6749490810dc0a9358a856340 100644 --- a/testsuite/tests/quantified-constraints/all.T +++ b/testsuite/tests/quantified-constraints/all.T @@ -44,3 +44,4 @@ test('T19690', normal, compile_fail, ['']) test('T23143', normal, compile, ['']) test('T23333', normal, compile, ['']) test('T23323', normal, compile, ['']) +test('T22238', normal, compile, [''])