summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorThomas Winant <thomas.winant@cs.kuleuven.be>2015-07-03 19:35:29 +0200
committerBen Gamari <ben@smart-cactus.org>2015-07-03 22:36:59 +0200
commitf8563838603f9a60f5012c3837142c5df89b8de2 (patch)
tree33f3acbc7bc58d5944e33cfee0ca311c87c3b42e /testsuite
parent1d6ead7d71ae9ad104f9bed9579462ce4a218594 (diff)
downloadhaskell-f8563838603f9a60f5012c3837142c5df89b8de2.tar.gz
Fix Trac #10519
Look through nested foralls when checking the validity of a partial type signature. The combination of D836 and D613 prompts this change. Test Plan: The test T10519 must pass Reviewers: simonpj, alanz, austin Reviewed By: simonpj, alanz, austin Subscribers: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D994 GHC Trac Issues: #10519
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10519.hs6
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10519.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T1
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/T10519.hs b/testsuite/tests/partial-sigs/should_compile/T10519.hs
new file mode 100644
index 0000000000..66a59a71f6
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T10519.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE ExplicitForAll #-}
+{-# LANGUAGE PartialTypeSignatures #-}
+module T10519 where
+
+foo :: forall a. _ => a -> a -> Bool
+foo x y = x == y
diff --git a/testsuite/tests/partial-sigs/should_compile/T10519.stderr b/testsuite/tests/partial-sigs/should_compile/T10519.stderr
new file mode 100644
index 0000000000..254292f6b2
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T10519.stderr
@@ -0,0 +1,4 @@
+
+T10519.hs:5:18: warning:
+ Found hole ‘_’ with inferred constraints: Eq a
+ In the type signature for ‘foo’: _ => a -> a -> Bool
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index 56f1045cce..e649472756 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -48,3 +48,4 @@ test('UncurryNamed', normal, compile, ['-ddump-types -fno-warn-partial-type-sign
test('WarningWildcardInstantiations', normal, compile, ['-ddump-types'])
test('T10403', normal, compile, [''])
test('T10438', normal, compile, [''])
+test('T10519', normal, compile, [''])