diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-12-03 13:03:07 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-12-04 14:21:28 +0000 |
commit | 28035c0900f8d535e0b03d4c2aa0c79ba728436d (patch) | |
tree | d8f07c1dc0385694a00b9e9e2d4e9ea39c6ab1b4 /testsuite | |
parent | 1c9fd3f1c5522372fcaf250c805b959e8090a62c (diff) | |
download | haskell-28035c0900f8d535e0b03d4c2aa0c79ba728436d.tar.gz |
Add derived constraints for wildcard signatures
This fixes Trac #11016
See Note [Add deriveds for signature contexts] in TcSimplify]
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/T11016.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/T11016.stderr | 11 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/all.T | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/T11016.hs b/testsuite/tests/partial-sigs/should_compile/T11016.hs new file mode 100644 index 0000000000..02b7d4d3a8 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_compile/T11016.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE ImplicitParams, PartialTypeSignatures #-} + +module T11016 where + +f1 :: (?x :: Int, _) => Int +f1 = ?x + +f2 :: (?x :: Int) => _ +f2 = ?x diff --git a/testsuite/tests/partial-sigs/should_compile/T11016.stderr b/testsuite/tests/partial-sigs/should_compile/T11016.stderr new file mode 100644 index 0000000000..74dd18d9bf --- /dev/null +++ b/testsuite/tests/partial-sigs/should_compile/T11016.stderr @@ -0,0 +1,11 @@ + +T11016.hs:5:19: warning: + Found constraint wildcard ‘_’ standing for ‘()’ + In the type signature: + f1 :: (?x :: Int, _) => Int + +T11016.hs:8:22: warning: + • Found type wildcard ‘_’ standing for ‘Int’ + • In the type signature: + f2 :: (?x :: Int) => _ + • Relevant bindings include f2 :: Int (bound at T11016.hs:9:1) diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T index 142d3318c8..5567ef1bdf 100644 --- a/testsuite/tests/partial-sigs/should_compile/all.T +++ b/testsuite/tests/partial-sigs/should_compile/all.T @@ -57,3 +57,4 @@ test('T10438', normal, compile, ['']) test('T10519', normal, compile, ['']) test('T10463', normal, compile, ['']) test('ExprSigLocal', normal, compile, ['']) +test('T11016', normal, compile, ['']) |