diff options
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T17202.hs | 20 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T17202.hs b/testsuite/tests/typecheck/should_compile/T17202.hs new file mode 100644 index 0000000000..d9d6ec281f --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T17202.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE QuantifiedConstraints #-} +{-# LANGUAGE TypeFamilies #-} + +module T17202 where + +type family F a + +class C1 a +class (forall c. C1 c) => C2 a +class (forall b. (b ~ F a) => C2 a) => C3 a + +data Dict c = c => Dict + +foo :: forall a. C3 a => Dict (C1 a) +foo = Dict + +bar :: forall a. C3 a => Dict (C1 a) +bar = Dict :: C2 a => Dict (C1 a) + diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 9a91f4ea9c..1d6e3476bc 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -687,3 +687,4 @@ test('T16832', normal, ghci_script, ['T16832.script']) test('T16946', normal, compile, ['']) test('T17007', normal, compile, ['']) test('T17067', normal, compile, ['']) +test('T17202', expect_broken(17202), compile, ['']) |