Commit 60989a6f authored by Ian Lynagh's avatar Ian Lynagh

(F)SLIT -> (f)sLit in StSyn

parent 7005cae8
...@@ -44,8 +44,6 @@ module StgSyn ( ...@@ -44,8 +44,6 @@ module StgSyn (
#endif #endif
) where ) where
#include "HsVersions.h"
import CostCentre ( CostCentreStack, CostCentre ) import CostCentre ( CostCentreStack, CostCentre )
import VarSet ( IdSet, isEmptyVarSet ) import VarSet ( IdSet, isEmptyVarSet )
import Var ( isId ) import Var ( isId )
...@@ -464,7 +462,7 @@ combineStgBinderInfo _ _ = NoStgBinderInfo ...@@ -464,7 +462,7 @@ combineStgBinderInfo _ _ = NoStgBinderInfo
-------------- --------------
pp_binder_info :: StgBinderInfo -> SDoc pp_binder_info :: StgBinderInfo -> SDoc
pp_binder_info NoStgBinderInfo = empty pp_binder_info NoStgBinderInfo = empty
pp_binder_info SatCallsOnly = ptext SLIT("sat-only") pp_binder_info SatCallsOnly = ptext (sLit "sat-only")
\end{code} \end{code}
%************************************************************************ %************************************************************************
...@@ -591,7 +589,7 @@ nonEmptySRT (SRTEntries vs) = not (isEmptyVarSet vs) ...@@ -591,7 +589,7 @@ nonEmptySRT (SRTEntries vs) = not (isEmptyVarSet vs)
nonEmptySRT _ = True nonEmptySRT _ = True
pprSRT :: SRT -> SDoc pprSRT :: SRT -> SDoc
pprSRT (NoSRT) = ptext SLIT("_no_srt_") pprSRT (NoSRT) = ptext (sLit "_no_srt_")
pprSRT (SRTEntries ids) = text "SRT:" <> ppr ids pprSRT (SRTEntries ids) = text "SRT:" <> ppr ids
pprSRT (SRT off _ _) = parens (ppr off <> comma <> text "*bitmap*") pprSRT (SRT off _ _) = parens (ppr off <> comma <> text "*bitmap*")
\end{code} \end{code}
...@@ -614,8 +612,8 @@ pprGenStgBinding (StgNonRec bndr rhs) ...@@ -614,8 +612,8 @@ pprGenStgBinding (StgNonRec bndr rhs)
4 ((<>) (ppr rhs) semi) 4 ((<>) (ppr rhs) semi)
pprGenStgBinding (StgRec pairs) pprGenStgBinding (StgRec pairs)
= vcat ((ifPprDebug (ptext SLIT("{- StgRec (begin) -}"))) : = vcat ((ifPprDebug (ptext (sLit "{- StgRec (begin) -}"))) :
(map (ppr_bind) pairs) ++ [(ifPprDebug (ptext SLIT("{- StgRec (end) -}")))]) (map (ppr_bind) pairs) ++ [(ifPprDebug (ptext (sLit "{- StgRec (end) -}")))])
where where
ppr_bind (bndr, expr) ppr_bind (bndr, expr)
= hang (hsep [ppr bndr, equals]) = hang (hsep [ppr bndr, equals])
...@@ -634,7 +632,7 @@ pprGenStgBindingWithSRT ...@@ -634,7 +632,7 @@ pprGenStgBindingWithSRT
pprGenStgBindingWithSRT (bind,srts) pprGenStgBindingWithSRT (bind,srts)
= vcat (pprGenStgBinding bind : map pprSRT srts) = vcat (pprGenStgBinding bind : map pprSRT srts)
where pprSRT (id,srt) = where pprSRT (id,srt) =
ptext SLIT("SRT") <> parens (ppr id) <> ptext SLIT(": ") <> ppr srt ptext (sLit "SRT") <> parens (ppr id) <> ptext (sLit ": ") <> ppr srt
pprStgBindingsWithSRTs :: [(StgBinding,[(Id,[Id])])] -> SDoc pprStgBindingsWithSRTs :: [(StgBinding,[(Id,[Id])])] -> SDoc
pprStgBindingsWithSRTs binds = vcat (map pprGenStgBindingWithSRT binds) pprStgBindingsWithSRTs binds = vcat (map pprGenStgBindingWithSRT binds)
...@@ -685,7 +683,7 @@ pprStgExpr (StgOpApp op args _) ...@@ -685,7 +683,7 @@ pprStgExpr (StgOpApp op args _)
= hsep [ pprStgOp op, brackets (interppSP args)] = hsep [ pprStgOp op, brackets (interppSP args)]
pprStgExpr (StgLam _ bndrs body) pprStgExpr (StgLam _ bndrs body)
=sep [ char '\\' <+> ppr bndrs <+> ptext SLIT("->"), =sep [ char '\\' <+> ppr bndrs <+> ptext (sLit "->"),
pprStgExpr body ] pprStgExpr body ]
\end{code} \end{code}
...@@ -702,13 +700,13 @@ pprStgExpr (StgLam _ bndrs body) ...@@ -702,13 +700,13 @@ pprStgExpr (StgLam _ bndrs body)
pprStgExpr (StgLet srt (StgNonRec bndr (StgRhsClosure cc bi free_vars upd_flag args rhs)) pprStgExpr (StgLet srt (StgNonRec bndr (StgRhsClosure cc bi free_vars upd_flag args rhs))
expr@(StgLet _ _)) expr@(StgLet _ _))
= ($$) = ($$)
(hang (hcat [ptext SLIT("let { "), ppr bndr, ptext SLIT(" = "), (hang (hcat [ptext (sLit "let { "), ppr bndr, ptext (sLit " = "),
ppr cc, ppr cc,
pp_binder_info bi, pp_binder_info bi,
ptext SLIT(" ["), ifPprDebug (interppSP free_vars), ptext SLIT("] \\"), ptext (sLit " ["), ifPprDebug (interppSP free_vars), ptext (sLit "] \\"),
ppr upd_flag, ptext SLIT(" ["), ppr upd_flag, ptext (sLit " ["),
interppSP args, char ']']) interppSP args, char ']'])
8 (sep [hsep [ppr rhs, ptext SLIT("} in")]])) 8 (sep [hsep [ppr rhs, ptext (sLit "} in")]]))
(ppr expr) (ppr expr)
-} -}
...@@ -716,44 +714,44 @@ pprStgExpr (StgLet srt (StgNonRec bndr (StgRhsClosure cc bi free_vars upd_flag a ...@@ -716,44 +714,44 @@ pprStgExpr (StgLet srt (StgNonRec bndr (StgRhsClosure cc bi free_vars upd_flag a
pprStgExpr (StgLet bind expr@(StgLet _ _)) pprStgExpr (StgLet bind expr@(StgLet _ _))
= ($$) = ($$)
(sep [hang (ptext SLIT("let {")) (sep [hang (ptext (sLit "let {"))
2 (hsep [pprGenStgBinding bind, ptext SLIT("} in")])]) 2 (hsep [pprGenStgBinding bind, ptext (sLit "} in")])])
(ppr expr) (ppr expr)
-- general case -- general case
pprStgExpr (StgLet bind expr) pprStgExpr (StgLet bind expr)
= sep [hang (ptext SLIT("let {")) 2 (pprGenStgBinding bind), = sep [hang (ptext (sLit "let {")) 2 (pprGenStgBinding bind),
hang (ptext SLIT("} in ")) 2 (ppr expr)] hang (ptext (sLit "} in ")) 2 (ppr expr)]
pprStgExpr (StgLetNoEscape lvs_whole lvs_rhss bind expr) pprStgExpr (StgLetNoEscape lvs_whole lvs_rhss bind expr)
= sep [hang (ptext SLIT("let-no-escape {")) = sep [hang (ptext (sLit "let-no-escape {"))
2 (pprGenStgBinding bind), 2 (pprGenStgBinding bind),
hang ((<>) (ptext SLIT("} in ")) hang ((<>) (ptext (sLit "} in "))
(ifPprDebug ( (ifPprDebug (
nest 4 ( nest 4 (
hcat [ptext SLIT("-- lvs: ["), interppSP (uniqSetToList lvs_whole), hcat [ptext (sLit "-- lvs: ["), interppSP (uniqSetToList lvs_whole),
ptext SLIT("]; rhs lvs: ["), interppSP (uniqSetToList lvs_rhss), ptext (sLit "]; rhs lvs: ["), interppSP (uniqSetToList lvs_rhss),
char ']'])))) char ']']))))
2 (ppr expr)] 2 (ppr expr)]
pprStgExpr (StgSCC cc expr) pprStgExpr (StgSCC cc expr)
= sep [ hsep [ptext SLIT("_scc_"), ppr cc], = sep [ hsep [ptext (sLit "_scc_"), ppr cc],
pprStgExpr expr ] pprStgExpr expr ]
pprStgExpr (StgTick m n expr) pprStgExpr (StgTick m n expr)
= sep [ hsep [ptext SLIT("_tick_"), pprModule m,text (show n)], = sep [ hsep [ptext (sLit "_tick_"), pprModule m,text (show n)],
pprStgExpr expr ] pprStgExpr expr ]
pprStgExpr (StgCase expr lvs_whole lvs_rhss bndr srt alt_type alts) pprStgExpr (StgCase expr lvs_whole lvs_rhss bndr srt alt_type alts)
= sep [sep [ptext SLIT("case"), = sep [sep [ptext (sLit "case"),
nest 4 (hsep [pprStgExpr expr, nest 4 (hsep [pprStgExpr expr,
ifPprDebug (dcolon <+> ppr alt_type)]), ifPprDebug (dcolon <+> ppr alt_type)]),
ptext SLIT("of"), ppr bndr, char '{'], ptext (sLit "of"), ppr bndr, char '{'],
ifPprDebug ( ifPprDebug (
nest 4 ( nest 4 (
hcat [ptext SLIT("-- lvs: ["), interppSP (uniqSetToList lvs_whole), hcat [ptext (sLit "-- lvs: ["), interppSP (uniqSetToList lvs_whole),
ptext SLIT("]; rhs lvs: ["), interppSP (uniqSetToList lvs_rhss), ptext (sLit "]; rhs lvs: ["), interppSP (uniqSetToList lvs_rhss),
ptext SLIT("]; "), ptext (sLit "]; "),
pprMaybeSRT srt])), pprMaybeSRT srt])),
nest 2 (vcat (map pprStgAlt alts)), nest 2 (vcat (map pprStgAlt alts)),
char '}'] char '}']
...@@ -761,7 +759,7 @@ pprStgExpr (StgCase expr lvs_whole lvs_rhss bndr srt alt_type alts) ...@@ -761,7 +759,7 @@ pprStgExpr (StgCase expr lvs_whole lvs_rhss bndr srt alt_type alts)
pprStgAlt :: (Outputable bndr, Outputable occ, Ord occ) pprStgAlt :: (Outputable bndr, Outputable occ, Ord occ)
=> GenStgAlt bndr occ -> SDoc => GenStgAlt bndr occ -> SDoc
pprStgAlt (con, params, _use_mask, expr) pprStgAlt (con, params, _use_mask, expr)
= hang (hsep [ppr con, interppSP params, ptext SLIT("->")]) = hang (hsep [ppr con, interppSP params, ptext (sLit "->")])
4 (ppr expr <> semi) 4 (ppr expr <> semi)
pprStgOp :: StgOp -> SDoc pprStgOp :: StgOp -> SDoc
...@@ -769,10 +767,10 @@ pprStgOp (StgPrimOp op) = ppr op ...@@ -769,10 +767,10 @@ pprStgOp (StgPrimOp op) = ppr op
pprStgOp (StgFCallOp op _) = ppr op pprStgOp (StgFCallOp op _) = ppr op
instance Outputable AltType where instance Outputable AltType where
ppr PolyAlt = ptext SLIT("Polymorphic") ppr PolyAlt = ptext (sLit "Polymorphic")
ppr (UbxTupAlt tc) = ptext SLIT("UbxTup") <+> ppr tc ppr (UbxTupAlt tc) = ptext (sLit "UbxTup") <+> ppr tc
ppr (AlgAlt tc) = ptext SLIT("Alg") <+> ppr tc ppr (AlgAlt tc) = ptext (sLit "Alg") <+> ppr tc
ppr (PrimAlt tc) = ptext SLIT("Prim") <+> ppr tc ppr (PrimAlt tc) = ptext (sLit "Prim") <+> ppr tc
\end{code} \end{code}
\begin{code} \begin{code}
...@@ -796,7 +794,7 @@ pprStgRhs (StgRhsClosure cc bi [free_var] upd_flag srt [{-no args-}] (StgApp fun ...@@ -796,7 +794,7 @@ pprStgRhs (StgRhsClosure cc bi [free_var] upd_flag srt [{-no args-}] (StgApp fun
= hcat [ ppr cc, = hcat [ ppr cc,
pp_binder_info bi, pp_binder_info bi,
brackets (ifPprDebug (ppr free_var)), brackets (ifPprDebug (ppr free_var)),
ptext SLIT(" \\"), ppr upd_flag, pprMaybeSRT srt, ptext SLIT(" [] "), ppr func ] ptext (sLit " \\"), ppr upd_flag, pprMaybeSRT srt, ptext (sLit " [] "), ppr func ]
-- general case -- general case
pprStgRhs (StgRhsClosure cc bi free_vars upd_flag srt args body) pprStgRhs (StgRhsClosure cc bi free_vars upd_flag srt args body)
...@@ -808,9 +806,9 @@ pprStgRhs (StgRhsClosure cc bi free_vars upd_flag srt args body) ...@@ -808,9 +806,9 @@ pprStgRhs (StgRhsClosure cc bi free_vars upd_flag srt args body)
pprStgRhs (StgRhsCon cc con args) pprStgRhs (StgRhsCon cc con args)
= hcat [ ppr cc, = hcat [ ppr cc,
space, ppr con, ptext SLIT("! "), brackets (interppSP args)] space, ppr con, ptext (sLit "! "), brackets (interppSP args)]
pprMaybeSRT :: SRT -> SDoc pprMaybeSRT :: SRT -> SDoc
pprMaybeSRT (NoSRT) = empty pprMaybeSRT (NoSRT) = empty
pprMaybeSRT srt = ptext SLIT("srt:") <> pprSRT srt pprMaybeSRT srt = ptext (sLit "srt:") <> pprSRT srt
\end{code} \end{code}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment