summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/gadt/ArrowGADTKappa.stderr
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2021-10-06 18:22:28 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-09 04:46:05 -0400
commit31983ab4c65204ad0fd14aac4c00648f5fa6ad6b (patch)
tree6bff70ce40f4d295ce084358ebe4b977e68bb43f /testsuite/tests/arrows/gadt/ArrowGADTKappa.stderr
parenta76409c758d8c7bd837dcc6c0b58f8cce656b4f1 (diff)
downloadhaskell-31983ab4c65204ad0fd14aac4c00648f5fa6ad6b.tar.gz
Reject GADT pattern matches in arrow notation
Tickets #20469 and #20470 showed that the current implementation of arrows is not at all up to the task of supporting GADTs: GHC produces ill-scoped Core programs because it doesn't propagate the evidence introduced by a GADT pattern match. For the time being, we reject GADT pattern matches in arrow notation. Hopefully we are able to add proper support for GADTs in arrows in the future.
Diffstat (limited to 'testsuite/tests/arrows/gadt/ArrowGADTKappa.stderr')
-rw-r--r--testsuite/tests/arrows/gadt/ArrowGADTKappa.stderr6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/gadt/ArrowGADTKappa.stderr b/testsuite/tests/arrows/gadt/ArrowGADTKappa.stderr
new file mode 100644
index 0000000000..0241dc9739
--- /dev/null
+++ b/testsuite/tests/arrows/gadt/ArrowGADTKappa.stderr
@@ -0,0 +1,6 @@
+
+ArrowGADTKappa.hs:17:26: error:
+ • Proc patterns cannot use existential or GADT data constructors
+ • In the pattern: MkG g
+ In an arrow kappa abstraction: (MkG g) -> show -< g
+ In the command: (id -< x) `handleG` (MkG g) -> show -< g