summaryrefslogtreecommitdiff
path: root/testsuite/tests/haddock
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/haddock
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/haddock')
-rw-r--r--testsuite/tests/haddock/haddock_examples/haddock.Test.stderr2
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr2
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr2
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr4
4 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/tests/haddock/haddock_examples/haddock.Test.stderr b/testsuite/tests/haddock/haddock_examples/haddock.Test.stderr
index fa92d3dd92..7ce82d0067 100644
--- a/testsuite/tests/haddock/haddock_examples/haddock.Test.stderr
+++ b/testsuite/tests/haddock/haddock_examples/haddock.Test.stderr
@@ -85,7 +85,7 @@ newtype N5 a b
newtype N6 a b = docs on the constructor only N6 {n6 :: a b}
<document comment>
newtype N7 a b = The 'N7' constructor N7 {n7 :: a b}
-class D a => C a where
+class (D a) => C a where
a :: IO a
b :: [a]
c :: a
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr
index 6d803bb440..2bb1a178e0 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA023.stderr
@@ -1,7 +1,7 @@
==================== Parser ====================
module ShouldCompile where
-test :: Eq a => [a] doc1 -> [a] doc2 -> [a] doc3
+test :: (Eq a) => [a] doc1 -> [a] doc2 -> [a] doc3
test xs ys = xs
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr
index 3e3cb12d10..4a57879c5c 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA026.stderr
@@ -1,7 +1,7 @@
==================== Parser ====================
module ShouldCompile where
-test :: Eq a => [a] doc1 -> forall b. [b] doc2 -> [a] doc3
+test :: (Eq a) => [a] doc1 -> forall b. [b] doc2 -> [a] doc3
test xs ys = xs
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr
index 10e88d2bfc..d1cb709c55 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA027.stderr
@@ -3,8 +3,8 @@
module ShouldCompile where
test ::
[a] doc1
- -> forall b. Ord b =>
- [b] doc2 -> forall c. Num c => [c] doc3 -> [a]
+ -> forall b. (Ord b) =>
+ [b] doc2 -> forall c. (Num c) => [c] doc3 -> [a]
test xs ys zs = xs