Skip to content
Snippets Groups Projects
Commit 28827c51 authored by daylily's avatar daylily Committed by Marge Bot
Browse files

Fix prettyprinting of SCC pragmas

parent 7a808419
No related branches found
No related tags found
No related merge requests found
...@@ -322,4 +322,4 @@ instance Eq StringLiteral where ...@@ -322,4 +322,4 @@ instance Eq StringLiteral where
(StringLiteral _ a _) == (StringLiteral _ b _) = a == b (StringLiteral _ a _) == (StringLiteral _ b _) = a == b
instance Outputable StringLiteral where instance Outputable StringLiteral where
ppr sl = pprWithSourceText (sl_st sl) (ftext $ sl_fs sl) ppr sl = pprWithSourceText (sl_st sl) (doubleQuotes $ ftext $ sl_fs sl)
...@@ -659,7 +659,7 @@ instance Ppr Pragma where ...@@ -659,7 +659,7 @@ instance Ppr Pragma where
= text "{-# COMPLETE" <+> (fsep $ punctuate comma $ map (pprName' Applied) cls) = text "{-# COMPLETE" <+> (fsep $ punctuate comma $ map (pprName' Applied) cls)
<+> maybe empty (\ty -> dcolon <+> pprName' Applied ty) mty <+> text "#-}" <+> maybe empty (\ty -> dcolon <+> pprName' Applied ty) mty <+> text "#-}"
ppr (SCCP nm str) ppr (SCCP nm str)
= text "{-# SCC" <+> pprName' Applied nm <+> maybe empty text str <+> text "#-}" = text "{-# SCC" <+> pprName' Applied nm <+> maybe empty pprString str <+> text "#-}"
------------------------------ ------------------------------
instance Ppr Inline where instance Ppr Inline where
......
...@@ -6,10 +6,10 @@ Main.hs:5:1: Splicing declarations ...@@ -6,10 +6,10 @@ Main.hs:5:1: Splicing declarations
Main.hs:6:1: Splicing declarations Main.hs:6:1: Splicing declarations
y y
======> ======>
{-# SCC g custom_name_g #-} {-# SCC g "custom_name_g" #-}
g = 1 g = 1
Main.hs:9:1-3: Splicing declarations Main.hs:9:1-3: Splicing declarations
gen gen
======> ======>
{-# SCC a #-} {-# SCC a #-}
{-# SCC b custom_name_b #-} {-# SCC b "custom_name_b" #-}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment