summaryrefslogtreecommitdiff
path: root/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2023-04-01 16:30:24 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-01 18:28:37 -0400
commit3b7bbb39f28c926f8cfd30744253a418854bee31 (patch)
treeef26c6952f6035af31af7ada635aeacc3a694a97 /libraries/template-haskell/Language/Haskell/TH/Ppr.hs
parent3da693466fd3e6a609a1a77361c50ed1b141858d (diff)
downloadhaskell-3b7bbb39f28c926f8cfd30744253a418854bee31.tar.gz
TH: revert changes to GadtC & RecGadtC
Commit 3f374399 included a breaking-change to the template-haskell library when it made the GadtC and RecGadtC constructors take non-empty lists of names. As this has the potential to break many users' packages, we decided to revert these changes for now.
Diffstat (limited to 'libraries/template-haskell/Language/Haskell/TH/Ppr.hs')
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Ppr.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
index d3101a985b..034d2687b3 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
@@ -11,7 +11,6 @@ module Language.Haskell.TH.Ppr where
import Text.PrettyPrint (render)
import Language.Haskell.TH.PprLib
import Language.Haskell.TH.Syntax
-import qualified Data.List.NonEmpty as NE ( toList )
import Data.Word ( Word8 )
import Data.Char ( toLower, chr)
import GHC.Show ( showMultiLineString )
@@ -684,21 +683,21 @@ instance Ppr Con where
<+> pprBangType st2
ppr (ForallC ns ctxt (GadtC cs sts ty))
- = commaSepApplied (NE.toList cs) <+> dcolon <+> pprForall ns ctxt
+ = commaSepApplied cs <+> dcolon <+> pprForall ns ctxt
<+> pprGadtRHS sts ty
ppr (ForallC ns ctxt (RecGadtC cs vsts ty))
- = commaSepApplied (NE.toList cs) <+> dcolon <+> pprForall ns ctxt
+ = commaSepApplied cs <+> dcolon <+> pprForall ns ctxt
<+> pprRecFields vsts ty
ppr (ForallC ns ctxt con)
= pprForall ns ctxt <+> ppr con
ppr (GadtC cs sts ty)
- = commaSepApplied (NE.toList cs) <+> dcolon <+> pprGadtRHS sts ty
+ = commaSepApplied cs <+> dcolon <+> pprGadtRHS sts ty
ppr (RecGadtC cs vsts ty)
- = commaSepApplied (NE.toList cs) <+> dcolon <+> pprRecFields vsts ty
+ = commaSepApplied cs <+> dcolon <+> pprRecFields vsts ty
instance Ppr PatSynDir where
ppr Unidir = text "<-"