Stop duplicating commas for splices inside list
parent
b6da307ecc
commit
d5f1deaa3d
|
@ -942,9 +942,13 @@ layoutExpr lexpr@(L _ expr) = do
|
||||||
++ showOutputable content
|
++ showOutputable content
|
||||||
++ "|]"
|
++ "|]"
|
||||||
)
|
)
|
||||||
HsSpliceE{} -> do
|
splice@HsSpliceE{} -> do
|
||||||
-- TODO
|
-- TODO
|
||||||
briDocByExactInlineOnly "HsSpliceE{}" lexpr
|
let epAnnWithoutCommas = case GHC.getLoc lexpr of
|
||||||
|
SrcSpanAnn (EpAnn anch (AnnListItem _) comms) srcLoc -> do
|
||||||
|
SrcSpanAnn (EpAnn anch (AnnListItem []) comms) srcLoc
|
||||||
|
x@(SrcSpanAnn EpAnnNotUsed _) -> x
|
||||||
|
briDocByExactInlineOnly "HsSpliceE{}" (L epAnnWithoutCommas splice)
|
||||||
HsProc{} -> do
|
HsProc{} -> do
|
||||||
-- TODO
|
-- TODO
|
||||||
briDocByExactInlineOnly "HsProc{}" lexpr
|
briDocByExactInlineOnly "HsProc{}" lexpr
|
||||||
|
|
|
@ -81,14 +81,20 @@ briDocByExactNoComment ast = do
|
||||||
-- not contain any newlines. If this property is not met, the semantics
|
-- not contain any newlines. If this property is not met, the semantics
|
||||||
-- depend on the @econf_AllowRiskyExactPrintUse@ config flag.
|
-- depend on the @econf_AllowRiskyExactPrintUse@ config flag.
|
||||||
briDocByExactInlineOnly
|
briDocByExactInlineOnly
|
||||||
:: ( ExactPrint.ExactPrint (GHC.XRec GhcPs a)
|
-- :: ( ExactPrint.ExactPrint (GHC.XRec GhcPs a)
|
||||||
, Data (GHC.XRec GhcPs a)
|
-- , Data (GHC.XRec GhcPs a)
|
||||||
|
-- , Data a
|
||||||
|
-- , Data (GHC.Anno a)
|
||||||
|
-- , Outputable (GHC.Anno a)
|
||||||
|
-- )
|
||||||
|
:: ( GHC.Anno a ~ GHC.SrcSpanAnn' (EpAnn ann)
|
||||||
|
, ExactPrint.ExactPrint (GenLocated (GHC.SrcSpanAnn' (EpAnn ann)) a)
|
||||||
, Data a
|
, Data a
|
||||||
, Data (GHC.Anno a)
|
, Data (GHC.Anno a)
|
||||||
, Outputable (GHC.Anno a)
|
, Outputable (GHC.Anno a)
|
||||||
)
|
)
|
||||||
=> String
|
=> String
|
||||||
-> GHC.XRec GhcPs a
|
-> GenLocated (GHC.SrcSpanAnn' (EpAnn ann)) a
|
||||||
-> ToBriDocM (BriDocNumbered)
|
-> ToBriDocM (BriDocNumbered)
|
||||||
briDocByExactInlineOnly infoStr ast = do
|
briDocByExactInlineOnly infoStr ast = do
|
||||||
traceIfDumpConf "ast"
|
traceIfDumpConf "ast"
|
||||||
|
|
Loading…
Reference in New Issue