summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-10-02 17:47:21 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-10-07 08:03:31 +0100
commit48089ccf4f1f239b3268b2cb52b8aa0f7356485b (patch)
tree3cb31487ed2d7f9369f7d13a188e4f0167840009 /testsuite/tests/ghci
parent2b59c7ac3f23dd229ddff20d991528ac742dfd24 (diff)
downloadhaskell-48089ccf4f1f239b3268b2cb52b8aa0f7356485b.tar.gz
Use correct precedence when printing contexts with class operators
Fixes Trac #9658
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr8
-rw-r--r--testsuite/tests/ghci/scripts/T9658.script4
-rw-r--r--testsuite/tests/ghci/scripts/T9658.stdout1
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T1
4 files changed, 10 insertions, 4 deletions
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index ba2354bb87..746fa4eea2 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -80,21 +80,21 @@
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
- the type signature for k :: Int ~ Bool => Int -> Bool
- In the ambiguity check for: Int ~ Bool => Int -> Bool
+ 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
../../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
+ 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
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
- the type signature for k :: Int ~ Bool => Int -> Bool
+ the type signature for k :: (Int ~ Bool) => Int -> Bool
../../typecheck/should_run/Defer01.hs:46:7: Warning:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
diff --git a/testsuite/tests/ghci/scripts/T9658.script b/testsuite/tests/ghci/scripts/T9658.script
new file mode 100644
index 0000000000..0b1f67ef0c
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T9658.script
@@ -0,0 +1,4 @@
+:set -XTypeOperators
+:set -XMultiParamTypeClasses
+class a :-: b where op :: a -> b
+:t op
diff --git a/testsuite/tests/ghci/scripts/T9658.stdout b/testsuite/tests/ghci/scripts/T9658.stdout
new file mode 100644
index 0000000000..fdde69ce91
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T9658.stdout
@@ -0,0 +1 @@
+op :: (a :-: b) => a -> b
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index f02a3c0447..4b20d0b3e3 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -178,3 +178,4 @@ test('T8959b', expect_broken(8959), ghci_script, ['T8959b.script'])
test('T9181', normal, ghci_script, ['T9181.script'])
test('T9086b', normal, ghci_script, ['T9086b.script'])
test('T9140', combined_output, ghci_script, ['T9140.script'])
+test('T9658', normal, ghci_script, ['T9658.script'])