diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-01-21 12:26:50 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-01-21 12:26:50 +0000 |
commit | 395ec414ff21bc37439194bb31a8f764b38b0fca (patch) | |
tree | 023eacc10794297aa544479025044e11a47e7d00 /testsuite/tests/polykinds | |
parent | b2e6350fb23403f1c88c5cfed5270d78dbdb6573 (diff) | |
download | haskell-395ec414ff21bc37439194bb31a8f764b38b0fca.tar.gz |
Allow implicit parameters in constraint synonyms
This fixes Trac #11466.
It went bad by accident in
commit ffc21506894c7887d3620423aaf86bc6113a1071
Refactor tuple constraints
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r-- | testsuite/tests/polykinds/T11466.hs | 16 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/testsuite/tests/polykinds/T11466.hs b/testsuite/tests/polykinds/T11466.hs new file mode 100644 index 0000000000..e479af08f3 --- /dev/null +++ b/testsuite/tests/polykinds/T11466.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE ImplicitParams, ConstraintKinds #-} + +module T11466 where + +-- This should be ok +type Bla = ?x::Int + +-- This should be ook +f :: Bla => Int -> Int +f y = ?x + y + +data T = T + +-- But this should be rejected +instance Bla => Eq T + diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 899e47c8bf..f1f25cecc4 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -132,4 +132,5 @@ test('T11249', normal, compile, ['']) test('T11248', normal, compile, ['']) test('T11278', normal, compile, ['']) test('T11255', normal, compile, ['']) -test('T11459', normal, compile_fail, [''])
\ No newline at end of file +test('T11459', normal, compile_fail, ['']) +test('T11466', normal, compile_fail, ['']) |