summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-18 17:21:19 -0400
committerBen Gamari <ben@smart-cactus.org>2019-09-18 21:58:03 -0400
commite5b0d85399274be2f498ad790466aa50066b46c2 (patch)
treec4d088e94c9a0d41f11817c58c2e665c274beeb0
parentc77fc3b20e93ba3215791d8d087a096853c4dd67 (diff)
downloadhaskell-wip/T17202.tar.gz
testsuite: Add test for #17202wip/T17202
-rw-r--r--testsuite/tests/typecheck/should_compile/T17202.hs20
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
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, [''])