summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_fail/T19928.stderr
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2021-06-01 15:46:49 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-02 04:41:08 -0400
commit7d8e1549b908ebb67bfa47d782914fe364e7015d (patch)
tree0679b01524057805873af4a9c3217556bcd024dd /testsuite/tests/parser/should_fail/T19928.stderr
parentc5a9e32ee0b372c2a044bce0e9009dcff21ee909 (diff)
downloadhaskell-7d8e1549b908ebb67bfa47d782914fe364e7015d.tar.gz
Disallow linear arrows in GADT records (#19928)
Before this patch, GHC used to silently accept programs such as the following: data R where D1 :: { d1 :: Int } %1 -> R The %1 annotation was completely ignored. Now it is a proper error. One remaining issue is that in the error message (⊸) turns into (%1 ->). This is to be corrected with upcoming exactprint updates.
Diffstat (limited to 'testsuite/tests/parser/should_fail/T19928.stderr')
-rw-r--r--testsuite/tests/parser/should_fail/T19928.stderr12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_fail/T19928.stderr b/testsuite/tests/parser/should_fail/T19928.stderr
new file mode 100644
index 0000000000..342639a100
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T19928.stderr
@@ -0,0 +1,12 @@
+
+T19928.hs:6:9: error:
+ Parse error: ‘(%1 ->)’
+ Record constructors in GADTs must use an ordinary, non-linear arrow.
+
+T19928.hs:7:9: error:
+ Parse error: ‘(%p ->)’
+ Record constructors in GADTs must use an ordinary, non-linear arrow.
+
+T19928.hs:8:9: error:
+ Parse error: ‘(%1 ->)’
+ Record constructors in GADTs must use an ordinary, non-linear arrow.