diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-05-25 16:18:06 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-05-26 12:37:48 +0100 |
commit | ad14efd539377aaf472ad69449dcaf3e679b0e51 (patch) | |
tree | 8db1807c108abb62225820bd3780209d969f541b /testsuite/tests/backpack/should_fail | |
parent | 226860e786ccb2c5660b64c9cf66e58eaf4dc672 (diff) | |
download | haskell-ad14efd539377aaf472ad69449dcaf3e679b0e51.tar.gz |
Some tidying up of type pretty-printing
Triggered by the changes in #13677, I ended up doing a bit of
refactoring in type pretty-printing.
* We were using TyOpPrec and FunPrec rather inconsitently, so
I made it consisent.
* That exposed the fact that we were a bit undecided about whether
to print
a + b -> c + d vs (a+b) -> (c+d)
and similarly
a ~ [b] => blah vs (a ~ [b]) => blah
I decided to make TyOpPrec and FunPrec compare equal
(in BasicTypes), so (->) is treated as equal precedence with
other type operators, so you get the unambiguous forms above,
even though they have more parens.
We could readily reverse this decision.
See Note [Type operator precedence] in BasicTypes
* I fixed a bug in pretty-printing of HsType where some
parens were omitted by mistake.
Diffstat (limited to 'testsuite/tests/backpack/should_fail')
-rw-r--r-- | testsuite/tests/backpack/should_fail/bkpfail24.stderr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/backpack/should_fail/bkpfail24.stderr b/testsuite/tests/backpack/should_fail/bkpfail24.stderr index ef6a7d6c01..484ebf144b 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail24.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail24.stderr @@ -7,15 +7,15 @@ bkpfail24.bkp:14:15: error: • Could not deduce: a ~ b from the context: {H1.T} ~ {H2.T} bound by the type signature for: - f :: forall a b. {H1.T} ~ {H2.T} => a -> b + f :: forall a b. ({H1.T} ~ {H2.T}) => a -> b at bkpfail24.bkp:13:9-34 ‘a’ is a rigid type variable bound by the type signature for: - f :: forall a b. {H1.T} ~ {H2.T} => a -> b + f :: forall a b. ({H1.T} ~ {H2.T}) => a -> b at bkpfail24.bkp:13:9-34 ‘b’ is a rigid type variable bound by the type signature for: - f :: forall a b. {H1.T} ~ {H2.T} => a -> b + f :: forall a b. ({H1.T} ~ {H2.T}) => a -> b at bkpfail24.bkp:13:9-34 • In the expression: x In an equation for ‘f’: f x = x |