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
(StringLiteral _ a _) == (StringLiteral _ b _) = a == b
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
= text "{-# COMPLETE" <+> (fsep $ punctuate comma $ map (pprName' Applied) cls)
<+> maybe empty (\ty -> dcolon <+> pprName' Applied ty) mty <+> text "#-}"
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
......
......@@ -6,10 +6,10 @@ Main.hs:5:1: Splicing declarations
Main.hs:6:1: Splicing declarations
y
======>
{-# SCC g custom_name_g #-}
{-# SCC g "custom_name_g" #-}
g = 1
Main.hs:9:1-3: Splicing declarations
gen
======>
{-# 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