summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-06-19 09:01:51 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-06-20 08:16:44 +0100
commit0ceb84e9668ba05d9a0ec49046ad7b4c2557a484 (patch)
tree427d783e2701a7565a1728c6aeb4ba8df548ca55 /testsuite/tests/ghci
parentb6693d3096c810b925af1899b45867482bcc81cf (diff)
downloadhaskell-0ceb84e9668ba05d9a0ec49046ad7b4c2557a484.tar.gz
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.
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T2766.stdout2
2 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index ed36a3eb3c..7635c8f804 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -84,13 +84,13 @@
the type signature for k :: Int ~ Bool => Int -> Bool
In the ambiguity check for: Int ~ Bool => Int -> Bool
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘k’: k :: Int ~ Bool => Int -> Bool
+ In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
In the ambiguity check for: Int ~ Bool => Int -> Bool
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘k’: k :: Int ~ Bool => Int -> Bool
+ In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match type ‘Int’ with ‘Bool’
diff --git a/testsuite/tests/ghci/scripts/T2766.stdout b/testsuite/tests/ghci/scripts/T2766.stdout
index f8ee42ff6a..5bcbd9e75e 100644
--- a/testsuite/tests/ghci/scripts/T2766.stdout
+++ b/testsuite/tests/ghci/scripts/T2766.stdout
@@ -1,3 +1,3 @@
first :: Arrow to => b `to` c -> (b, d) `to` (c, d)
:: Arrow to => to b c -> to (b, d) (c, d)
-first :: b~>c -> (b, d)~>(c, d) :: (b ~> c) -> (b, d) ~> (c, d)
+first :: b~>c -> (b, d)~>(c, d) :: b ~> c -> (b, d) ~> (c, d)