diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-04-07 15:23:18 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-18 13:20:29 -0400 |
commit | 84cc8394d075cea236faa0bcd9ef0a84de89ee8c (patch) | |
tree | cc2828cd11a0c8f8880d11fc15d6f19a858b882b /testsuite | |
parent | 18bc16ed78dfa1fe9498c5ac1ca38e9f84267872 (diff) | |
download | haskell-84cc8394d075cea236faa0bcd9ef0a84de89ee8c.tar.gz |
Add a missing zonk in tcHsPartialType
I omitted a vital zonk when refactoring tcHsPartialType in
commit 48fb3482f8cbc8a4b37161021e846105f980eed4
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date: Wed Jun 5 08:55:17 2019 +0100
Fix typechecking of partial type signatures
This patch fixes it and adds commentary to explain why.
Fixes #18008
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/T18008.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/T18008.stderr | 5 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/all.T | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/T18008.hs b/testsuite/tests/partial-sigs/should_compile/T18008.hs new file mode 100644 index 0000000000..5e76173a04 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_compile/T18008.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE PartialTypeSignatures #-} +module Bug where + +f :: (forall a. Show a => a -> String) -> _ +f s = s () + diff --git a/testsuite/tests/partial-sigs/should_compile/T18008.stderr b/testsuite/tests/partial-sigs/should_compile/T18008.stderr new file mode 100644 index 0000000000..4b59da8b03 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_compile/T18008.stderr @@ -0,0 +1,5 @@ + +T18008.hs:5:43: warning: [-Wpartial-type-signatures (in -Wdefault)] + • Found type wildcard ‘_’ standing for ‘String’ + • In the type ‘(forall a. Show a => a -> String) -> _’ + In the type signature: f :: (forall a. Show a => a -> String) -> _ diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T index 4cb12ed144..e8d84fe3bb 100644 --- a/testsuite/tests/partial-sigs/should_compile/all.T +++ b/testsuite/tests/partial-sigs/should_compile/all.T @@ -95,3 +95,4 @@ test('T16334', normal, compile, ['']) test('T16728', normal, compile, ['']) test('T16728a', normal, compile, ['']) test('T16728b', normal, compile, ['']) +test('T18008', normal, compile, ['']) |