summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2018-08-01 14:28:16 -0400
committerBen Gamari <ben@smart-cactus.org>2018-08-01 19:38:48 -0400
commit120cc9f85ee1120072eb44c5bf37ac3055883605 (patch)
tree5954dcb38b9199ee9d969ce275c937adc4967534 /testsuite/tests/partial-sigs
parent7f3cb50dd311caefb536d582f1e3d1b33d6650f6 (diff)
downloadhaskell-120cc9f85ee1120072eb44c5bf37ac3055883605.tar.gz
Fix #15415 and simplify tcWildCardBinders
Test Plan: Validate Reviewers: goldfire, simonpj, bgamari Reviewed By: simonpj Subscribers: RyanGlScott, rwbarton, thomie, carter GHC Trac Issues: #15415 Differential Revision: https://phabricator.haskell.org/D5022
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r--testsuite/tests/partial-sigs/should_run/GHCiWildcardKind.script1
-rw-r--r--testsuite/tests/partial-sigs/should_run/T15415.script17
-rw-r--r--testsuite/tests/partial-sigs/should_run/T15415.stderr27
-rw-r--r--testsuite/tests/partial-sigs/should_run/T15415.stdout6
-rw-r--r--testsuite/tests/partial-sigs/should_run/all.T1
5 files changed, 52 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_run/GHCiWildcardKind.script b/testsuite/tests/partial-sigs/should_run/GHCiWildcardKind.script
index a3f9b3512a..08de235de0 100644
--- a/testsuite/tests/partial-sigs/should_run/GHCiWildcardKind.script
+++ b/testsuite/tests/partial-sigs/should_run/GHCiWildcardKind.script
@@ -1,3 +1,4 @@
+:set -XPartialTypeSignatures -fno-warn-partial-type-signatures
:kind _
:kind Maybe _
diff --git a/testsuite/tests/partial-sigs/should_run/T15415.script b/testsuite/tests/partial-sigs/should_run/T15415.script
new file mode 100644
index 0000000000..93a3f41b09
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_run/T15415.script
@@ -0,0 +1,17 @@
+import Data.Proxy
+:set -XPolyKinds
+data Dependent a (x :: a)
+
+:k Proxy _
+:k Proxy (Maybe :: _)
+:k Dependent _
+
+:set -XPartialTypeSignatures
+:k Proxy _
+:k Proxy (Maybe :: _)
+:k Dependent _
+
+:set -fno-warn-partial-type-signatures
+:k Proxy _
+:k Proxy (Maybe :: _)
+:k Dependent _
diff --git a/testsuite/tests/partial-sigs/should_run/T15415.stderr b/testsuite/tests/partial-sigs/should_run/T15415.stderr
new file mode 100644
index 0000000000..c11d54e322
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_run/T15415.stderr
@@ -0,0 +1,27 @@
+
+<interactive>:1:7: error:
+ Found type wildcard ‘_’ standing for ‘w0 :: k0’
+ Where: ‘w0’ is an ambiguous type variable
+ ‘k0’ is an ambiguous type variable
+ To use the inferred type, enable PartialTypeSignatures
+
+<interactive>:1:17: error:
+ Found type wildcard ‘_’ standing for ‘* -> *’
+ To use the inferred type, enable PartialTypeSignatures
+
+<interactive>:1:11: error:
+ Found type wildcard ‘_’ standing for ‘w0’
+ Where: ‘w0’ is an ambiguous type variable
+ To use the inferred type, enable PartialTypeSignatures
+
+<interactive>:1:7: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ Found type wildcard ‘_’ standing for ‘w0 :: k0’
+ Where: ‘w0’ is an ambiguous type variable
+ ‘k0’ is an ambiguous type variable
+
+<interactive>:1:17: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ Found type wildcard ‘_’ standing for ‘* -> *’
+
+<interactive>:1:11: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ Found type wildcard ‘_’ standing for ‘w0’
+ Where: ‘w0’ is an ambiguous type variable
diff --git a/testsuite/tests/partial-sigs/should_run/T15415.stdout b/testsuite/tests/partial-sigs/should_run/T15415.stdout
new file mode 100644
index 0000000000..709da2f17c
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_run/T15415.stdout
@@ -0,0 +1,6 @@
+Proxy _ :: *
+Proxy (Maybe :: _) :: *
+Dependent _ :: w -> *
+Proxy _ :: *
+Proxy (Maybe :: _) :: *
+Dependent _ :: w -> *
diff --git a/testsuite/tests/partial-sigs/should_run/all.T b/testsuite/tests/partial-sigs/should_run/all.T
index 0ca1b613a1..ad08f01d48 100644
--- a/testsuite/tests/partial-sigs/should_run/all.T
+++ b/testsuite/tests/partial-sigs/should_run/all.T
@@ -1 +1,2 @@
test('GHCiWildcardKind', normal, ghci_script, ['GHCiWildcardKind.script'])
+test('T15415', normal, ghci_script, ['T15415.script'])