2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
4 \section[StgSyn]{Shared term graph (STG) syntax for spineless-tagless code generation}
6 This data type represents programs just before code generation
7 (conversion to @AbstractC@): basically, what we have is a stylised
8 form of @CoreSyntax@, the style being one that happens to be ideally
9 suited to spineless tagless code generation.
16 GenStgBinding(..), GenStgExpr(..), GenStgRhs(..),
17 GenStgAlt, AltType(..),
19 UpdateFlag(..), isUpdatable,
22 noBinderInfo, stgSatOcc, stgUnsatOcc, satCallsOnly,
25 -- a set of synonyms for the most common (only :-) parameterisation
27 StgBinding, StgExpr, StgRhs, StgAlt,
36 stgBindHasCafRefs, stgArgHasCafRefs, stgRhsArity,
37 isDllConApp, isStgTypeArg,
40 pprStgBinding, pprStgBindings, pprStgBindingsWithSRTs
47 #include "HsVersions.h"
49 import CostCentre ( CostCentreStack, CostCentre )
50 import VarSet ( IdSet, isEmptyVarSet )
53 import IdInfo ( mayHaveCafRefs )
54 import Literal ( Literal, literalType )
55 import ForeignCall ( ForeignCall )
56 import CoreSyn ( AltCon )
57 import PprCore ( {- instances -} )
58 import PrimOp ( PrimOp, PrimCall )
61 import TyCon ( TyCon )
63 import Unique ( Unique )
65 import StaticFlags ( opt_SccProfilingOn )
70 import Packages ( isDllName )
71 import Type ( typePrimRep )
72 import TyCon ( PrimRep(..) )
76 %************************************************************************
78 \subsection{@GenStgBinding@}
80 %************************************************************************
82 As usual, expressions are interesting; other things are boring. Here
83 are the boring things [except note the @GenStgRhs@], parameterised
84 with respect to binder and occurrence information (just as in
87 There is one SRT for each group of bindings.
90 data GenStgBinding bndr occ
91 = StgNonRec bndr (GenStgRhs bndr occ)
92 | StgRec [(bndr, GenStgRhs bndr occ)]
95 %************************************************************************
97 \subsection{@GenStgArg@}
99 %************************************************************************
105 | StgTypeArg Type -- For when we want to preserve all type info
109 isStgTypeArg :: StgArg -> Bool
110 isStgTypeArg (StgTypeArg _) = True
111 isStgTypeArg _ = False
113 isDllConApp :: PackageId -> DataCon -> [StgArg] -> Bool
114 -- Does this constructor application refer to
115 -- anything in a different *Windows* DLL?
116 -- If so, we can't allocate it statically
117 #if mingw32_TARGET_OS
118 isDllConApp this_pkg con args
119 = isDllName this_pkg (dataConName con) || any is_dll_arg args
121 is_dll_arg ::StgArg -> Bool
122 is_dll_arg (StgVarArg v) = isAddrRep (typePrimRep (idType v))
123 && isDllName this_pkg (idName v)
126 isAddrRep :: PrimRep -> Bool
127 -- True of machine adddresses; these are the things that don't
129 -- The key point here is that VoidRep comes out False, so that
130 -- a top level nullary GADT construtor is False for isDllConApp
134 -- T1 :: forall a. (a~Int) -> T a
135 -- and hence the top-level binding
137 -- $WT1 = T1 Int (Coercion (Refl Int))
138 -- The coercion argument here gets VoidRep
139 isAddrRep AddrRep = True
140 isAddrRep PtrRep = True
144 isDllConApp _ _ _ = False
147 stgArgType :: StgArg -> Type
148 -- Very half baked becase we have lost the type arguments
149 stgArgType (StgVarArg v) = idType v
150 stgArgType (StgLitArg lit) = literalType lit
151 stgArgType (StgTypeArg _) = panic "stgArgType called on stgTypeArg"
154 %************************************************************************
156 \subsection{STG expressions}
158 %************************************************************************
160 The @GenStgExpr@ data type is parameterised on binder and occurrence
163 %************************************************************************
165 \subsubsection{@GenStgExpr@ application}
167 %************************************************************************
169 An application is of a function to a list of atoms [not expressions].
170 Operationally, we want to push the arguments on the stack and call the
171 function. (If the arguments were expressions, we would have to build
172 their closures first.)
174 There is no constructor for a lone variable; it would appear as
177 type GenStgLiveVars occ = UniqSet occ
179 data GenStgExpr bndr occ
182 [GenStgArg occ] -- arguments; may be empty
185 %************************************************************************
187 \subsubsection{@StgConApp@ and @StgPrimApp@---saturated applications}
189 %************************************************************************
191 There are a specialised forms of application, for
192 constructors, primitives, and literals.
196 -- StgConApp is vital for returning unboxed tuples
197 -- which can't be let-bound first
199 [GenStgArg occ] -- Saturated
201 | StgOpApp StgOp -- Primitive op or foreign call
202 [GenStgArg occ] -- Saturated
204 -- We need to know this so that we can
205 -- assign result registers
208 %************************************************************************
210 \subsubsection{@StgLam@}
212 %************************************************************************
214 StgLam is used *only* during CoreToStg's work. Before CoreToStg has finished
215 it encodes (\x -> e) as (let f = \x -> e in f)
219 Type -- Type of whole lambda (useful when making a binder for it)
221 StgExpr -- Body of lambda
225 %************************************************************************
227 \subsubsection{@GenStgExpr@: case-expressions}
229 %************************************************************************
231 This has the same boxed/unboxed business as Core case expressions.
234 (GenStgExpr bndr occ)
235 -- the thing to examine
237 (GenStgLiveVars occ) -- Live vars of whole case expression,
238 -- plus everything that happens after the case
239 -- i.e., those which mustn't be overwritten
241 (GenStgLiveVars occ) -- Live vars of RHSs (plus what happens afterwards)
242 -- i.e., those which must be saved before eval.
244 -- note that an alt's constructor's
245 -- binder-variables are NOT counted in the
246 -- free vars for the alt's RHS
248 bndr -- binds the result of evaluating the scrutinee
250 SRT -- The SRT for the continuation
254 [GenStgAlt bndr occ] -- The DEFAULT case is always *first*
255 -- if it is there at all
258 %************************************************************************
260 \subsubsection{@GenStgExpr@: @let(rec)@-expressions}
262 %************************************************************************
264 The various forms of let(rec)-expression encode most of the
265 interesting things we want to do.
269 let-closure x = [free-vars] expr [args]
274 let x = (\free-vars -> \args -> expr) free-vars
276 \tr{args} may be empty (and is for most closures). It isn't under
277 circumstances like this:
283 let-closure x = [z] [y] (y+z)
285 The idea is that we compile code for @(y+z)@ in an environment in which
286 @z@ is bound to an offset from \tr{Node}, and @y@ is bound to an
287 offset from the stack pointer.
289 (A let-closure is an @StgLet@ with a @StgRhsClosure@ RHS.)
293 let-constructor x = Constructor [args]
297 (A let-constructor is an @StgLet@ with a @StgRhsCon@ RHS.)
300 Letrec-expressions are essentially the same deal as
301 let-closure/let-constructor, so we use a common structure and
302 distinguish between them with an @is_recursive@ boolean flag.
306 let-unboxed u = an arbitrary arithmetic expression in unboxed values
309 All the stuff on the RHS must be fully evaluated. No function calls either!
311 (We've backed away from this toward case-expressions with
312 suitably-magical alts ...)
315 ~[Advanced stuff here! Not to start with, but makes pattern matching
316 generate more efficient code.]
319 let-escapes-not fail = expr
322 Here the idea is that @e'@ guarantees not to put @fail@ in a data structure,
323 or pass it to another function. All @e'@ will ever do is tail-call @fail@.
324 Rather than build a closure for @fail@, all we need do is to record the stack
325 level at the moment of the @let-escapes-not@; then entering @fail@ is just
326 a matter of adjusting the stack pointer back down to that point and entering
331 f x y = let z = huge-expression in
337 (A let-escapes-not is an @StgLetNoEscape@.)
340 We may eventually want:
342 let-literal x = Literal
346 (ToDo: is this obsolete?)
349 And so the code for let(rec)-things:
352 (GenStgBinding bndr occ) -- right hand sides (see below)
353 (GenStgExpr bndr occ) -- body
355 | StgLetNoEscape -- remember: ``advanced stuff''
356 (GenStgLiveVars occ) -- Live in the whole let-expression
357 -- Mustn't overwrite these stack slots
358 -- *Doesn't* include binders of the let(rec).
360 (GenStgLiveVars occ) -- Live in the right hand sides (only)
361 -- These are the ones which must be saved on
362 -- the stack if they aren't there already
363 -- *Does* include binders of the let(rec) if recursive.
365 (GenStgBinding bndr occ) -- right hand sides (see below)
366 (GenStgExpr bndr occ) -- body
369 %************************************************************************
371 \subsubsection{@GenStgExpr@: @scc@ expressions}
373 %************************************************************************
375 Finally for @scc@ expressions we introduce a new STG construct.
379 CostCentre -- label of SCC expression
380 (GenStgExpr bndr occ) -- scc expression
383 %************************************************************************
385 \subsubsection{@GenStgExpr@: @hpc@ expressions}
387 %************************************************************************
389 Finally for @scc@ expressions we introduce a new STG construct.
393 Module -- the module of the source of this tick
395 (GenStgExpr bndr occ) -- sub expression
399 %************************************************************************
401 \subsection{STG right-hand sides}
403 %************************************************************************
405 Here's the rest of the interesting stuff for @StgLet@s; the first
406 flavour is for closures:
408 data GenStgRhs bndr occ
410 CostCentreStack -- CCS to be attached (default is CurrentCCS)
411 StgBinderInfo -- Info about how this binder is used (see below)
412 [occ] -- non-global free vars; a list, rather than
413 -- a set, because order is important
414 !UpdateFlag -- ReEntrant | Updatable | SingleEntry
415 SRT -- The SRT reference
416 [bndr] -- arguments; if empty, then not a function;
417 -- as above, order is important.
418 (GenStgExpr bndr occ) -- body
420 An example may be in order. Consider:
422 let t = \x -> \y -> ... x ... y ... p ... q in e
424 Pulling out the free vars and stylising somewhat, we get the equivalent:
426 let t = (\[p,q] -> \[x,y] -> ... x ... y ... p ...q) p q
428 Stg-operationally, the @[x,y]@ are on the stack, the @[p,q]@ are
429 offsets from @Node@ into the closure, and the code ptr for the closure
430 will be exactly that in parentheses above.
432 The second flavour of right-hand-side is for constructors (simple but important):
435 CostCentreStack -- CCS to be attached (default is CurrentCCS).
436 -- Top-level (static) ones will end up with
437 -- DontCareCCS, because we don't count static
438 -- data in heap profiles, and we don't set CCCS
439 -- from static closure.
440 DataCon -- constructor
441 [GenStgArg occ] -- args
445 stgRhsArity :: StgRhs -> Int
446 stgRhsArity (StgRhsClosure _ _ _ _ _ bndrs _)
447 = ASSERT( all isId bndrs ) length bndrs
448 -- The arity never includes type parameters, but they should have gone by now
449 stgRhsArity (StgRhsCon _ _ _) = 0
453 stgBindHasCafRefs :: GenStgBinding bndr Id -> Bool
454 stgBindHasCafRefs (StgNonRec _ rhs) = rhsHasCafRefs rhs
455 stgBindHasCafRefs (StgRec binds) = any rhsHasCafRefs (map snd binds)
457 rhsHasCafRefs :: GenStgRhs bndr Id -> Bool
458 rhsHasCafRefs (StgRhsClosure _ _ _ upd srt _ _)
459 = isUpdatable upd || nonEmptySRT srt
460 rhsHasCafRefs (StgRhsCon _ _ args)
461 = any stgArgHasCafRefs args
463 stgArgHasCafRefs :: GenStgArg Id -> Bool
464 stgArgHasCafRefs (StgVarArg id) = mayHaveCafRefs (idCafInfo id)
465 stgArgHasCafRefs _ = False
468 Here's the @StgBinderInfo@ type, and its combining op:
472 | SatCallsOnly -- All occurrences are *saturated* *function* calls
473 -- This means we don't need to build an info table and
474 -- slow entry code for the thing
475 -- Thunks never get this value
477 noBinderInfo, stgUnsatOcc, stgSatOcc :: StgBinderInfo
478 noBinderInfo = NoStgBinderInfo
479 stgUnsatOcc = NoStgBinderInfo
480 stgSatOcc = SatCallsOnly
482 satCallsOnly :: StgBinderInfo -> Bool
483 satCallsOnly SatCallsOnly = True
484 satCallsOnly NoStgBinderInfo = False
486 combineStgBinderInfo :: StgBinderInfo -> StgBinderInfo -> StgBinderInfo
487 combineStgBinderInfo SatCallsOnly SatCallsOnly = SatCallsOnly
488 combineStgBinderInfo _ _ = NoStgBinderInfo
491 pp_binder_info :: StgBinderInfo -> SDoc
492 pp_binder_info NoStgBinderInfo = empty
493 pp_binder_info SatCallsOnly = ptext (sLit "sat-only")
496 %************************************************************************
498 \subsection[Stg-case-alternatives]{STG case alternatives}
500 %************************************************************************
502 Very like in @CoreSyntax@ (except no type-world stuff).
504 The type constructor is guaranteed not to be abstract; that is, we can
505 see its representation. This is important because the code generator
506 uses it to determine return conventions etc. But it's not trivial
507 where there's a moduule loop involved, because some versions of a type
508 constructor might not have all the constructors visible. So
509 mkStgAlgAlts (in CoreToStg) ensures that it gets the TyCon from the
510 constructors or literals (which are guaranteed to have the Real McCoy)
511 rather than from the scrutinee type.
514 type GenStgAlt bndr occ
515 = (AltCon, -- alts: data constructor,
516 [bndr], -- constructor's parameters,
517 [Bool], -- "use mask", same length as
518 -- parameters; a True in a
519 -- param's position if it is
521 GenStgExpr bndr occ) -- ...right-hand side.
524 = PolyAlt -- Polymorphic (a type variable)
525 | UbxTupAlt TyCon -- Unboxed tuple
526 | AlgAlt TyCon -- Algebraic data type; the AltCons will be DataAlts
527 | PrimAlt TyCon -- Primitive data type; the AltCons will be LitAlts
530 %************************************************************************
532 \subsection[Stg]{The Plain STG parameterisation}
534 %************************************************************************
536 This happens to be the only one we use at the moment.
539 type StgBinding = GenStgBinding Id Id
540 type StgArg = GenStgArg Id
541 type StgLiveVars = GenStgLiveVars Id
542 type StgExpr = GenStgExpr Id Id
543 type StgRhs = GenStgRhs Id Id
544 type StgAlt = GenStgAlt Id Id
547 %************************************************************************
549 \subsubsection[UpdateFlag-datatype]{@UpdateFlag@}
551 %************************************************************************
553 This is also used in @LambdaFormInfo@ in the @ClosureInfo@ module.
555 A @ReEntrant@ closure may be entered multiple times, but should not be
556 updated or blackholed. An @Updatable@ closure should be updated after
557 evaluation (and may be blackholed during evaluation). A @SingleEntry@
558 closure will only be entered once, and so need not be updated but may
559 safely be blackholed.
562 data UpdateFlag = ReEntrant | Updatable | SingleEntry
564 instance Outputable UpdateFlag where
566 = char (case u of { ReEntrant -> 'r'; Updatable -> 'u'; SingleEntry -> 's' })
568 isUpdatable :: UpdateFlag -> Bool
569 isUpdatable ReEntrant = False
570 isUpdatable SingleEntry = False
571 isUpdatable Updatable = True
574 %************************************************************************
576 \subsubsection{StgOp}
578 %************************************************************************
580 An StgOp allows us to group together PrimOps and ForeignCalls.
581 It's quite useful to move these around together, notably
582 in StgOpApp and COpStmt.
585 data StgOp = StgPrimOp PrimOp
587 | StgPrimCallOp PrimCall
589 | StgFCallOp ForeignCall Unique
590 -- The Unique is occasionally needed by the C pretty-printer
591 -- (which lacks a unique supply), notably when generating a
592 -- typedef for foreign-export-dynamic
596 %************************************************************************
598 \subsubsection[Static Reference Tables]{@SRT@}
600 %************************************************************************
602 There is one SRT per top-level function group. Each local binding and
603 case expression within this binding group has a subrange of the whole
604 SRT, expressed as an offset and length.
606 In CoreToStg we collect the list of CafRefs at each SRT site, which is later
607 converted into the length and offset form by the SRT pass.
612 -- generated by CoreToStg
613 | SRT !Int{-offset-} !Int{-length-} !Bitmap{-bitmap-}
614 -- generated by computeSRTs
616 nonEmptySRT :: SRT -> Bool
617 nonEmptySRT NoSRT = False
618 nonEmptySRT (SRTEntries vs) = not (isEmptyVarSet vs)
621 pprSRT :: SRT -> SDoc
622 pprSRT (NoSRT) = ptext (sLit "_no_srt_")
623 pprSRT (SRTEntries ids) = text "SRT:" <> ppr ids
624 pprSRT (SRT off _ _) = parens (ppr off <> comma <> text "*bitmap*")
627 %************************************************************************
629 \subsection[Stg-pretty-printing]{Pretty-printing}
631 %************************************************************************
633 Robin Popplestone asked for semi-colon separators on STG binds; here's
634 hoping he likes terminators instead... Ditto for case alternatives.
637 pprGenStgBinding :: (Outputable bndr, Outputable bdee, Ord bdee)
638 => GenStgBinding bndr bdee -> SDoc
640 pprGenStgBinding (StgNonRec bndr rhs)
641 = hang (hsep [ppr bndr, equals])
642 4 ((<>) (ppr rhs) semi)
644 pprGenStgBinding (StgRec pairs)
645 = vcat ((ifPprDebug (ptext (sLit "{- StgRec (begin) -}"))) :
646 (map (ppr_bind) pairs) ++ [(ifPprDebug (ptext (sLit "{- StgRec (end) -}")))])
648 ppr_bind (bndr, expr)
649 = hang (hsep [ppr bndr, equals])
650 4 ((<>) (ppr expr) semi)
652 pprStgBinding :: StgBinding -> SDoc
653 pprStgBinding bind = pprGenStgBinding bind
655 pprStgBindings :: [StgBinding] -> SDoc
656 pprStgBindings binds = vcat (map pprGenStgBinding binds)
658 pprGenStgBindingWithSRT
659 :: (Outputable bndr, Outputable bdee, Ord bdee)
660 => (GenStgBinding bndr bdee,[(Id,[Id])]) -> SDoc
662 pprGenStgBindingWithSRT (bind,srts)
663 = vcat (pprGenStgBinding bind : map pprSRT srts)
664 where pprSRT (id,srt) =
665 ptext (sLit "SRT") <> parens (ppr id) <> ptext (sLit ": ") <> ppr srt
667 pprStgBindingsWithSRTs :: [(StgBinding,[(Id,[Id])])] -> SDoc
668 pprStgBindingsWithSRTs binds = vcat (map pprGenStgBindingWithSRT binds)
672 instance (Outputable bdee) => Outputable (GenStgArg bdee) where
675 instance (Outputable bndr, Outputable bdee, Ord bdee)
676 => Outputable (GenStgBinding bndr bdee) where
677 ppr = pprGenStgBinding
679 instance (Outputable bndr, Outputable bdee, Ord bdee)
680 => Outputable (GenStgExpr bndr bdee) where
683 instance (Outputable bndr, Outputable bdee, Ord bdee)
684 => Outputable (GenStgRhs bndr bdee) where
685 ppr rhs = pprStgRhs rhs
689 pprStgArg :: (Outputable bdee) => GenStgArg bdee -> SDoc
691 pprStgArg (StgVarArg var) = ppr var
692 pprStgArg (StgLitArg con) = ppr con
693 pprStgArg (StgTypeArg ty) = char '@' <+> ppr ty
697 pprStgExpr :: (Outputable bndr, Outputable bdee, Ord bdee)
698 => GenStgExpr bndr bdee -> SDoc
700 pprStgExpr (StgLit lit) = ppr lit
703 pprStgExpr (StgApp func args)
705 4 (sep (map (ppr) args))
709 pprStgExpr (StgConApp con args)
710 = hsep [ ppr con, brackets (interppSP args)]
712 pprStgExpr (StgOpApp op args _)
713 = hsep [ pprStgOp op, brackets (interppSP args)]
715 pprStgExpr (StgLam _ bndrs body)
716 =sep [ char '\\' <+> ppr bndrs <+> ptext (sLit "->"),
721 -- special case: let v = <very specific thing>
727 -- Very special! Suspicious! (SLPJ)
730 pprStgExpr (StgLet srt (StgNonRec bndr (StgRhsClosure cc bi free_vars upd_flag args rhs))
733 (hang (hcat [ptext (sLit "let { "), ppr bndr, ptext (sLit " = "),
736 ptext (sLit " ["), ifPprDebug (interppSP free_vars), ptext (sLit "] \\"),
737 ppr upd_flag, ptext (sLit " ["),
738 interppSP args, char ']'])
739 8 (sep [hsep [ppr rhs, ptext (sLit "} in")]]))
743 -- special case: let ... in let ...
745 pprStgExpr (StgLet bind expr@(StgLet _ _))
747 (sep [hang (ptext (sLit "let {"))
748 2 (hsep [pprGenStgBinding bind, ptext (sLit "} in")])])
752 pprStgExpr (StgLet bind expr)
753 = sep [hang (ptext (sLit "let {")) 2 (pprGenStgBinding bind),
754 hang (ptext (sLit "} in ")) 2 (ppr expr)]
756 pprStgExpr (StgLetNoEscape lvs_whole lvs_rhss bind expr)
757 = sep [hang (ptext (sLit "let-no-escape {"))
758 2 (pprGenStgBinding bind),
759 hang ((<>) (ptext (sLit "} in "))
762 hcat [ptext (sLit "-- lvs: ["), interppSP (uniqSetToList lvs_whole),
763 ptext (sLit "]; rhs lvs: ["), interppSP (uniqSetToList lvs_rhss),
767 pprStgExpr (StgSCC cc expr)
768 = sep [ hsep [ptext (sLit "_scc_"), ppr cc],
771 pprStgExpr (StgTick m n expr)
772 = sep [ hsep [ptext (sLit "_tick_"), pprModule m,text (show n)],
775 pprStgExpr (StgCase expr lvs_whole lvs_rhss bndr srt alt_type alts)
776 = sep [sep [ptext (sLit "case"),
777 nest 4 (hsep [pprStgExpr expr,
778 ifPprDebug (dcolon <+> ppr alt_type)]),
779 ptext (sLit "of"), ppr bndr, char '{'],
782 hcat [ptext (sLit "-- lvs: ["), interppSP (uniqSetToList lvs_whole),
783 ptext (sLit "]; rhs lvs: ["), interppSP (uniqSetToList lvs_rhss),
786 nest 2 (vcat (map pprStgAlt alts)),
789 pprStgAlt :: (Outputable bndr, Outputable occ, Ord occ)
790 => GenStgAlt bndr occ -> SDoc
791 pprStgAlt (con, params, _use_mask, expr)
792 = hang (hsep [ppr con, interppSP params, ptext (sLit "->")])
795 pprStgOp :: StgOp -> SDoc
796 pprStgOp (StgPrimOp op) = ppr op
797 pprStgOp (StgPrimCallOp op)= ppr op
798 pprStgOp (StgFCallOp op _) = ppr op
800 instance Outputable AltType where
801 ppr PolyAlt = ptext (sLit "Polymorphic")
802 ppr (UbxTupAlt tc) = ptext (sLit "UbxTup") <+> ppr tc
803 ppr (AlgAlt tc) = ptext (sLit "Alg") <+> ppr tc
804 ppr (PrimAlt tc) = ptext (sLit "Prim") <+> ppr tc
809 pprStgLVs :: Outputable occ => GenStgLiveVars occ -> SDoc
811 = getPprStyle $ \ sty ->
812 if userStyle sty || isEmptyUniqSet lvs then
815 hcat [text "{-lvs:", interpp'SP (uniqSetToList lvs), text "-}"]
820 pprStgRhs :: (Outputable bndr, Outputable bdee, Ord bdee)
821 => GenStgRhs bndr bdee -> SDoc
824 pprStgRhs (StgRhsClosure cc bi [free_var] upd_flag srt [{-no args-}] (StgApp func []))
827 brackets (ifPprDebug (ppr free_var)),
828 ptext (sLit " \\"), ppr upd_flag, pprMaybeSRT srt, ptext (sLit " [] "), ppr func ]
831 pprStgRhs (StgRhsClosure cc bi free_vars upd_flag srt args body)
832 = hang (hsep [if opt_SccProfilingOn then ppr cc else empty,
834 ifPprDebug (brackets (interppSP free_vars)),
835 char '\\' <> ppr upd_flag, pprMaybeSRT srt, brackets (interppSP args)])
838 pprStgRhs (StgRhsCon cc con args)
840 space, ppr con, ptext (sLit "! "), brackets (interppSP args)]
842 pprMaybeSRT :: SRT -> SDoc
843 pprMaybeSRT (NoSRT) = empty
844 pprMaybeSRT srt = ptext (sLit "srt:") <> pprSRT srt