diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-09-18 17:21:19 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-20 05:15:11 -0400 |
commit | 2f8ce45a6f874519cf5a908a7eb0d9633a2389f9 (patch) | |
tree | d8202c1a132be6d436f9d97f23934d35e09219cd /testsuite | |
parent | 5119296440e6846c553c72b8a93afc5ecfa576f0 (diff) | |
download | haskell-2f8ce45a6f874519cf5a908a7eb0d9633a2389f9.tar.gz |
testsuite: Add test for #17202
Diffstat (limited to 'testsuite')
-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 bb01a02dd3..e359f8db6b 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -688,3 +688,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, ['']) |