diff options
author | sheaf <sam.derbyshire@gmail.com> | 2021-10-06 18:22:28 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-09 04:46:05 -0400 |
commit | 31983ab4c65204ad0fd14aac4c00648f5fa6ad6b (patch) | |
tree | 6bff70ce40f4d295ce084358ebe4b977e68bb43f /compiler/GHC/Hs/Instances.hs | |
parent | a76409c758d8c7bd837dcc6c0b58f8cce656b4f1 (diff) | |
download | haskell-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 'compiler/GHC/Hs/Instances.hs')
-rw-r--r-- | compiler/GHC/Hs/Instances.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Hs/Instances.hs b/compiler/GHC/Hs/Instances.hs index 78a663d7fa..21cd9b5d76 100644 --- a/compiler/GHC/Hs/Instances.hs +++ b/compiler/GHC/Hs/Instances.hs @@ -366,6 +366,8 @@ deriving instance Data (HsStmtContext GhcPs) deriving instance Data (HsStmtContext GhcRn) deriving instance Data (HsStmtContext GhcTc) +deriving instance Data HsArrowMatchContext + deriving instance Data HsDoFlavour deriving instance Data (HsMatchContext GhcPs) |