Commit e56251f6 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Marge Bot

Remove redundant special case in STG pretty-printer

This special case existed for no reason, and made things inconsistent.

Before

    Boolean.$bT :: Boolean.Boolean
    [GblId, Str=m, Unf=OtherCon []] =
        CAF_ccs  \ u  []  Boolean.$bT1;

After

    Boolean.$bF :: Boolean.Boolean
    [GblId, Str=m, Unf=OtherCon []] =
        \u [] Boolean.$bF1;

The cost-centre is now hidden when not profiling, as is the case with
other types of closures.
parent 7e6aeb13
Pipeline #9821 failed with stages
in 342 minutes and 24 seconds
......@@ -68,7 +68,6 @@ import Data.Data ( Data )
import Data.List ( intersperse )
import DataCon
import DynFlags
import FastString
import ForeignCall ( ForeignCall )
import Id
import IdInfo ( mayHaveCafRefs )
......@@ -859,15 +858,6 @@ instance Outputable AltType where
pprStgRhs :: OutputablePass pass => GenStgRhs pass -> SDoc
-- special case
pprStgRhs (StgRhsClosure ext cc upd_flag [{-no args-}] (StgApp func []))
= sdocWithDynFlags $ \dflags ->
hsep [ ppr cc,
if not $ gopt Opt_SuppressStgExts dflags
then ppr ext else empty,
text " \\", ppr upd_flag, ptext (sLit " [] "), ppr func ]
-- general case
pprStgRhs (StgRhsClosure ext cc upd_flag args body)
= sdocWithDynFlags $ \dflags ->
hang (hsep [if gopt Opt_SccProfilingOn dflags then ppr cc else empty,
......
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