summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-06-02 12:43:11 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-06-02 12:43:11 +0100
commitb2b69b2a31e5d41210e851687887377072afd020 (patch)
tree5aa1018e2f230730d847699091d3dc252e8c9ab2 /testsuite/tests
parent8e5f8cf4892971f9e1cf143672801eaad7138098 (diff)
downloadhaskell-b2b69b2a31e5d41210e851687887377072afd020.tar.gz
Test Trac #10438
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10438.hs8
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10438.stderr26
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T1
3 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/T10438.hs b/testsuite/tests/partial-sigs/should_compile/T10438.hs
new file mode 100644
index 0000000000..583e0dddba
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T10438.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE PartialTypeSignatures #-}
+{-# LANGUAGE TypeFamilies #-}
+module T10438 where
+
+foo f = g
+ where g r = x
+ where x :: _
+ x = r
diff --git a/testsuite/tests/partial-sigs/should_compile/T10438.stderr b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
new file mode 100644
index 0000000000..9133a5646f
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
@@ -0,0 +1,26 @@
+
+T10438.hs:7:22: warning:
+ Found hole ‘_’ with type: w_1
+ Where: ‘w_1’ is a rigid type variable bound by
+ the inferred type of g :: w_1 -> w_1 at T10438.hs:6:9
+ Relevant bindings include
+ r :: w_1 (bound at T10438.hs:6:11)
+ g :: w_1 -> w_1 (bound at T10438.hs:6:9)
+ f :: t (bound at T10438.hs:5:5)
+ foo :: t -> w_ -> w_ (bound at T10438.hs:5:1)
+ In the type signature for ‘x’: _
+ In an equation for ‘g’:
+ g r
+ = x
+ where
+ x :: _
+ x = r
+ In an equation for ‘foo’:
+ foo f
+ = g
+ where
+ g r
+ = x
+ where
+ x :: _
+ x = r
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index 91294a580c..812ff0a4cf 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -47,3 +47,4 @@ test('Uncurry', normal, compile, ['-ddump-types -fno-warn-partial-type-signature
test('UncurryNamed', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('WarningWildcardInstantiations', normal, compile, ['-ddump-types'])
test('T10403', normal, compile, [''])
+test('T10438', normal, compile, [''])