Test #9109 in typecheck/should_fail/T9109
authorRichard Eisenberg <eir@cis.upenn.edu>
Tue, 18 Nov 2014 20:19:20 +0000 (15:19 -0500)
committerRichard Eisenberg <eir@cis.upenn.edu>
Thu, 20 Nov 2014 20:27:29 +0000 (15:27 -0500)
testsuite/tests/typecheck/should_fail/T9109.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T9109.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T9109.hs b/testsuite/tests/typecheck/should_fail/T9109.hs
new file mode 100644 (file)
index 0000000..725cb66
--- /dev/null
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs #-}
+
+module T9109 where
+
+data G a where
+  GBool :: G Bool
+
+foo GBool = True
diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr
new file mode 100644 (file)
index 0000000..5ef2340
--- /dev/null
@@ -0,0 +1,15 @@
+
+T9109.hs:8:13:
+    Couldn't match expected type ‘t’ with actual type ‘Bool’
+      ‘t’ is untouchable
+        inside the constraints (t1 ~ Bool)
+        bound by a pattern with constructor
+                   GBool :: G Bool,
+                 in an equation for ‘foo’
+        at T9109.hs:8:5-9
+      ‘t’ is a rigid type variable bound by
+          the inferred type of foo :: G t1 -> t at T9109.hs:8:1
+    Possible fix: add a type signature for ‘foo’
+    Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1)
+    In the expression: True
+    In an equation for ‘foo’: foo GBool = True
index 14df71e..28709e8 100644 (file)
@@ -344,3 +344,4 @@ test('T9739', normal, compile_fail, [''])
 test('T9774', normal, compile_fail, [''])
 test('T9318', normal, compile_fail, [''])
 test('T9201', normal, compile_fail, [''])
+test('T9109', normal, compile_fail, [''])