diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-12-10 10:15:16 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-12-10 10:16:35 +0000 |
commit | 602889aa23daecc21caaecb99ae8b055bca191f6 (patch) | |
tree | 7c29d26c9570992d7dfa51ea4e61f9f9dbcb3fd8 /testsuite/tests/partial-sigs | |
parent | 688069ca83e949b9bde9883af7df26114e2f9bc0 (diff) | |
download | haskell-602889aa23daecc21caaecb99ae8b055bca191f6.tar.gz |
Test Trac #11192
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/T11192.hs | 15 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/T11192.stderr | 44 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/all.T | 1 |
3 files changed, 60 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/T11192.hs b/testsuite/tests/partial-sigs/should_compile/T11192.hs new file mode 100644 index 0000000000..fb27a35443 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_compile/T11192.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE PartialTypeSignatures #-} + +module T11192 where + +fails :: a +fails = + let go :: _ + go 0 a = a + in go (0 :: Int) undefined + +succeeds :: a +succeeds = + let go :: _ + go _ a = a + in go (0 :: Int) undefined diff --git a/testsuite/tests/partial-sigs/should_compile/T11192.stderr b/testsuite/tests/partial-sigs/should_compile/T11192.stderr new file mode 100644 index 0000000000..2fac5eb8b6 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_compile/T11192.stderr @@ -0,0 +1,44 @@ + +T11192.hs:7:14: warning: + • Found type wildcard ‘_’ standing for ‘Int -> t -> t’ + Where: ‘t’ is a rigid type variable bound by + the inferred type of go :: Int -> t -> t at T11192.hs:8:8 + • In the type signature: + go :: _ + In the expression: + let + go :: _ + go 0 a = a + in go (0 :: Int) undefined + In an equation for ‘fails’: + fails + = let + go :: _ + go 0 a = a + in go (0 :: Int) undefined + • Relevant bindings include + go :: Int -> t -> t (bound at T11192.hs:8:8) + fails :: a (bound at T11192.hs:6:1) + +T11192.hs:13:14: warning: + • Found type wildcard ‘_’ standing for ‘t -> t1 -> t1’ + Where: ‘t’ is a rigid type variable bound by + the inferred type of go :: t -> t1 -> t1 at T11192.hs:14:8 + ‘t1’ is a rigid type variable bound by + the inferred type of go :: t -> t1 -> t1 at T11192.hs:14:8 + • In the type signature: + go :: _ + In the expression: + let + go :: _ + go _ a = a + in go (0 :: Int) undefined + In an equation for ‘succeeds’: + succeeds + = let + go :: _ + go _ a = a + in go (0 :: Int) undefined + • Relevant bindings include + go :: t -> t1 -> t1 (bound at T11192.hs:14:8) + succeeds :: a (bound at T11192.hs:12:1) diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T index 5567ef1bdf..caa8934419 100644 --- a/testsuite/tests/partial-sigs/should_compile/all.T +++ b/testsuite/tests/partial-sigs/should_compile/all.T @@ -58,3 +58,4 @@ test('T10519', normal, compile, ['']) test('T10463', normal, compile, ['']) test('ExprSigLocal', normal, compile, ['']) test('T11016', normal, compile, ['']) +test('T11192', normal, compile, ['']) |