summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Krüger <ole@vprsm.de>2021-01-27 16:13:24 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-02-22 18:27:06 -0500
commit6d7086a3512f2e832d4e53154c574e62e034962b (patch)
treea820b87a2b69a025b928a7fce52f0153d6aeb098
parentdb74c8f48897f5366298b1a1d9e698cc8e3b8547 (diff)
downloadhaskell-6d7086a3512f2e832d4e53154c574e62e034962b.tar.gz
Fix TemplateHaskell pretty printer for CompleteP (#19270)
The COMPLETE pragma was not properly terminated with a '#-}'.
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Ppr.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
index 54f138539f..20487c904f 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
@@ -596,7 +596,7 @@ instance Ppr Pragma where
= text "{-# LINE" <+> int line <+> text (show file) <+> text "#-}"
ppr (CompleteP cls mty)
= text "{-# COMPLETE" <+> (fsep $ punctuate comma $ map ppr cls)
- <+> maybe empty (\ty -> dcolon <+> ppr ty) mty
+ <+> maybe empty (\ty -> dcolon <+> ppr ty) mty <+> text "#-}"
------------------------------
instance Ppr Inline where