diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-04-07 07:30:42 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-04-07 07:30:42 -0400 |
commit | 718a018128a0ba2ae20001c10bc8ca4d929a1d33 (patch) | |
tree | dc3e180e21f1358797130675cde3b6360c84d008 /testsuite | |
parent | 875e59d37186a997df2cc7d0fdb49ef41d0e31ce (diff) | |
download | haskell-718a018128a0ba2ae20001c10bc8ca4d929a1d33.tar.gz |
Fix #14238 by always pretty-printing visible tyvars
Summary:
Before, GHC would never print visible tyvars in the absence
of `-fprint-explicit-foralls`, which led to `:kind` displaying
incorrect kinds in GHCi. The fix is simple—simply check beforehand
if any of the type variable binders are required when deciding when
to pretty-print them.
Test Plan: make test TEST=T14238
Reviewers: simonpj, goldfire, bgamari
Subscribers: thomie, carter
GHC Trac Issues: #14238
Differential Revision: https://phabricator.haskell.org/D4564
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/dependent/ghci/T14238.script | 4 | ||||
-rw-r--r-- | testsuite/tests/dependent/ghci/T14238.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/dependent/ghci/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T11252.stdout | 2 |
4 files changed, 7 insertions, 1 deletions
diff --git a/testsuite/tests/dependent/ghci/T14238.script b/testsuite/tests/dependent/ghci/T14238.script new file mode 100644 index 0000000000..7c27123e00 --- /dev/null +++ b/testsuite/tests/dependent/ghci/T14238.script @@ -0,0 +1,4 @@ +:set -XTypeInType +:m + Data.Kind +data Foo (k :: Type) :: k -> Type +:kind Foo diff --git a/testsuite/tests/dependent/ghci/T14238.stdout b/testsuite/tests/dependent/ghci/T14238.stdout new file mode 100644 index 0000000000..fddbc0de54 --- /dev/null +++ b/testsuite/tests/dependent/ghci/T14238.stdout @@ -0,0 +1 @@ +Foo :: forall k -> k -> * diff --git a/testsuite/tests/dependent/ghci/all.T b/testsuite/tests/dependent/ghci/all.T index 956272fa55..bd819c28bc 100644 --- a/testsuite/tests/dependent/ghci/all.T +++ b/testsuite/tests/dependent/ghci/all.T @@ -2,3 +2,4 @@ test('T11549', [ expect_broken( 11787 ), expect_broken( 11786 ) ], ghci_script, ['T11549.script']) +test('T14238', normal, ghci_script, ['T14238.script']) diff --git a/testsuite/tests/ghci/scripts/T11252.stdout b/testsuite/tests/ghci/scripts/T11252.stdout index f6d45ddf32..eddba4530e 100644 --- a/testsuite/tests/ghci/scripts/T11252.stdout +++ b/testsuite/tests/ghci/scripts/T11252.stdout @@ -1 +1 @@ -Proxy1 :: k -> * +Proxy1 :: forall k -> k -> * |