diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-03-03 13:48:38 -0500 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-03-03 13:48:38 -0500 |
commit | 99c556d2bb0594fd718622906168d2ea25a0bf06 (patch) | |
tree | 650a91fbb7a5f36d6610b1fbc143b98430a10e8a /testsuite | |
parent | a2d03c69b782212e6c476cfc1870bae493a4ac89 (diff) | |
download | haskell-99c556d2bb0594fd718622906168d2ea25a0bf06.tar.gz |
Parenthesize (() :: Constraint) in argument position
Summary:
A simple oversight in the pretty-printer lead to a special
case for `() :: Constraint` not being parenthesized correctly when
used in an argument position. Easily fixed with a `maybeParen`.
Test Plan: make test TEST=T14796
Reviewers: alanz, goldfire, bgamari, simonpj
Reviewed By: bgamari, simonpj
Subscribers: simonpj, rwbarton, thomie, carter
GHC Trac Issues: #14796
Differential Revision: https://phabricator.haskell.org/D4408
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghci/scripts/T14796.script | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T14796.stdout | 1 | ||||
-rwxr-xr-x | testsuite/tests/ghci/scripts/all.T | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T14796.script b/testsuite/tests/ghci/scripts/T14796.script new file mode 100644 index 0000000000..9a85d440ef --- /dev/null +++ b/testsuite/tests/ghci/scripts/T14796.script @@ -0,0 +1,3 @@ +:set -XGADTs -XConstraintKinds -XTypeApplications +data ECC ctx f a where ECC :: ctx => f a -> ECC ctx f a +:t ECC @() @[] @() diff --git a/testsuite/tests/ghci/scripts/T14796.stdout b/testsuite/tests/ghci/scripts/T14796.stdout new file mode 100644 index 0000000000..c8bb21936a --- /dev/null +++ b/testsuite/tests/ghci/scripts/T14796.stdout @@ -0,0 +1 @@ +ECC @() @[] @() :: [()] -> ECC (() :: Constraint) [] () diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 997203f88d..dcce723687 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -264,3 +264,4 @@ test('T13963', normal, ghci_script, ['T13963.script']) test('T14342', [extra_hc_opts("-XOverloadedStrings -XRebindableSyntax")], ghci_script, ['T14342.script']) test('T14676', extra_files(['../prog002']), ghci_script, ['T14676.script']) +test('T14796', normal, ghci_script, ['T14796.script']) |