summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/quantified-constraints/T19921.stderr4
-rw-r--r--testsuite/tests/quantified-constraints/T21006.hs14
-rw-r--r--testsuite/tests/quantified-constraints/T21006.stderr7
-rw-r--r--testsuite/tests/quantified-constraints/all.T1
4 files changed, 24 insertions, 2 deletions
diff --git a/testsuite/tests/quantified-constraints/T19921.stderr b/testsuite/tests/quantified-constraints/T19921.stderr
index 9c2b064204..7433fc6370 100644
--- a/testsuite/tests/quantified-constraints/T19921.stderr
+++ b/testsuite/tests/quantified-constraints/T19921.stderr
@@ -2,8 +2,8 @@
T19921.hs:29:8: error:
• Could not deduce r arising from a use of ‘Dict’
from the context: (x \/ y) \/ z
- bound by a quantified context at T19921.hs:1:1
+ bound by a quantified context at T19921.hs:29:8-11
or from: (x ⇒ r, (y \/ z) ⇒ r)
- bound by a quantified context at T19921.hs:1:1
+ bound by a quantified context at T19921.hs:29:8-11
• In the expression: Dict
In an equation for ‘dict’: dict = Dict
diff --git a/testsuite/tests/quantified-constraints/T21006.hs b/testsuite/tests/quantified-constraints/T21006.hs
new file mode 100644
index 0000000000..6c63216de0
--- /dev/null
+++ b/testsuite/tests/quantified-constraints/T21006.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE QuantifiedConstraints #-}
+{-# LANGUAGE FunctionalDependencies #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE PolyKinds #-}
+
+module Err where
+
+import GHC.Exts (Constraint)
+
+class Determines b | -> b
+
+class (forall (b :: *) (c :: Constraint). (Determines b, Determines c) => c) => OpCode
+
+instance OpCode
diff --git a/testsuite/tests/quantified-constraints/T21006.stderr b/testsuite/tests/quantified-constraints/T21006.stderr
new file mode 100644
index 0000000000..aa5c5ef9a2
--- /dev/null
+++ b/testsuite/tests/quantified-constraints/T21006.stderr
@@ -0,0 +1,7 @@
+
+T21006.hs:14:10: error:
+ • Couldn't match kind ‘Constraint’ with ‘*’
+ When matching types
+ b :: *
+ c :: Constraint
+ • In the instance declaration for ‘OpCode’
diff --git a/testsuite/tests/quantified-constraints/all.T b/testsuite/tests/quantified-constraints/all.T
index 0754104319..d055adc848 100644
--- a/testsuite/tests/quantified-constraints/all.T
+++ b/testsuite/tests/quantified-constraints/all.T
@@ -32,3 +32,4 @@ test('T17458', normal, compile_fail, [''])
test('T18432', normal, compile, [''])
test('T19921', normal, compile_fail, [''])
test('T16474', normal, compile_fail, [''])
+test('T21006', normal, compile_fail, [''])