summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-05-06 19:49:04 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-21 12:17:30 -0400
commit5108e84abb102920ab28e3aeb083ab6e483eb2f6 (patch)
tree9c33d21aef48611f99e09ae845d260de8bdd5e32 /compiler/GHC/Tc
parentb797aa420b65c8ee214a4fc94813d0d597352bb4 (diff)
downloadhaskell-5108e84abb102920ab28e3aeb083ab6e483eb2f6.tar.gz
More judiciously panic in `ts_pat`
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r--compiler/GHC/Tc/Gen/Pat.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs
index 59a9ca1e23..234fbcb048 100644
--- a/compiler/GHC/Tc/Gen/Pat.hs
+++ b/compiler/GHC/Tc/Gen/Pat.hs
@@ -647,11 +647,11 @@ AST is used for the subtraction operation.
-- Here we get rid of it and add the finalizers to the global environment.
--
-- See Note [Delaying modFinalizers in untyped splices] in GHC.Rename.Splice.
- SplicePat _ (HsSpliced _ mod_finalizers (HsSplicedPat pat)) -> do
+ SplicePat _ splice -> case splice of
+ (HsSpliced _ mod_finalizers (HsSplicedPat pat)) -> do
addModFinalizersWithLclEnv mod_finalizers
tc_pat pat_ty pat penv thing_inside
-
- _other_pat -> panic "tc_pat"
+ _ -> panic "invalid splice in splice pat"
{-