[commit: ghc] master: Tidy up the printing of single-predicate contexts (0ceb84e)
git at git.haskell.org
git at git.haskell.org
Fri Jun 20 07:16:58 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0ceb84e9668ba05d9a0ec49046ad7b4c2557a484/ghc
>---------------------------------------------------------------
commit 0ceb84e9668ba05d9a0ec49046ad7b4c2557a484
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Jun 19 09:01:51 2014 +0100
Tidy up the printing of single-predicate contexts
This covers things like
Eq a => blah and (?x::Int) => blah
where there is just one predicate. Previously we used an ad-hoc
test to decide whether to parenthesise it, but acutally there is
a much simpler solution: just use the existing precedence mechamism.
This applies both to Type and HsType.
>---------------------------------------------------------------
0ceb84e9668ba05d9a0ec49046ad7b4c2557a484
compiler/hsSyn/HsTypes.lhs | 81 +++++++++-------------
compiler/types/Type.lhs | 10 +--
compiler/types/Type.lhs-boot | 1 -
compiler/types/TypeRep.lhs | 50 ++++++++-----
.../tests/deSugar/should_compile/T2431.stderr | 2 +-
testsuite/tests/ghci/scripts/Defer02.stderr | 4 +-
testsuite/tests/ghci/scripts/T2766.stdout | 2 +-
.../haddock/haddock_examples/haddock.Test.stderr | 2 +-
.../should_compile_flag_haddock/haddockA023.stderr | 2 +-
.../should_compile_flag_haddock/haddockA026.stderr | 2 +-
.../should_compile_flag_haddock/haddockA027.stderr | 4 +-
.../indexed-types/should_fail/NoMatchErr.stderr | 2 +-
.../tests/indexed-types/should_fail/T1900.stderr | 2 +-
testsuite/tests/perf/compiler/T5837.stderr | 2 +-
testsuite/tests/polykinds/T7278.stderr | 2 +-
.../typecheck/should_fail/ContextStack2.stderr | 2 +-
testsuite/tests/typecheck/should_fail/T7609.stderr | 2 +-
testsuite/tests/typecheck/should_fail/T7778.stderr | 2 +-
.../tests/typecheck/should_fail/T8392a.stderr | 2 +-
testsuite/tests/typecheck/should_fail/T8806.stderr | 2 +-
.../tests/typecheck/should_fail/tcfail032.stderr | 4 +-
.../tests/typecheck/should_fail/tcfail058.stderr | 2 +-
.../tests/typecheck/should_fail/tcfail215.stderr | 2 +-
23 files changed, 88 insertions(+), 98 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 0ceb84e9668ba05d9a0ec49046ad7b4c2557a484
More information about the ghc-commits
mailing list