pprLit :: CmmLit -> SDoc
pprLit lit = sdocWithDynFlags $ \dflags ->
             case lit of
    CmmInt i rep ->
        hcat [ (if i < 0 then parens else id)(integer i)
             , ppUnless (rep == wordWidth dflags) $
               space <> dcolon <+> ppr rep ]

    CmmFloat f rep     -> hsep [ double (fromRat f), dcolon, ppr rep ]
    CmmVec lits        -> char '<' <> commafy (map pprLit lits) <> char '>'
    CmmLabel clbl      -> ppr clbl
    CmmLabelOff clbl i -> ppr clbl <> ppr_offset i
    CmmLabelDiffOff clbl1 clbl2 i -> ppr clbl1 <> char '-'
                                  <> ppr clbl2 <> ppr_offset i
    CmmBlock id        -> ppr id
    CmmHighStackMark -> text "<highSp>"
pprLit :: CmmLit -> SDoc
pprLit lit = sdocWithDynFlags $ \dflags ->
             case lit of
    CmmInt i rep ->
        hcat [ (if i < 0 then parens else id)(integer i)
             , ppUnless (rep == wordWidth dflags) $
               space <> dcolon <+> ppr rep ]

    CmmFloat f rep     -> hsep [ double (fromRat f), dcolon, ppr rep ]
    CmmVec lits        -> char '<' <> commafy (map pprLit lits) <> char '>'
    CmmLabel clbl      -> ppr clbl
    CmmLabelOff clbl i -> ppr clbl <> ppr_offset i
    CmmLabelDiffOff clbl1 clbl2 i -> ppr clbl1 <> char '-'
                                  <> ppr clbl2 <> ppr_offset i
    CmmBlock id        -> ppr id
    CmmHighStackMark -> text "<highSp>"
pprLit lit = sdocWithDynFlags $ \dflags ->
             case lit of
    CmmInt i rep ->
        hcat [ (if i < 0 then parens else id)(integer i)
             , ppUnless (rep == wordWidth dflags) $
               space <> dcolon <+> ppr rep ]

    CmmFloat f rep     -> hsep [ double (fromRat f), dcolon, ppr rep ]
    CmmVec lits        -> char '<' <> commafy (map pprLit lits) <> char '>'
    CmmLabel clbl      -> ppr clbl
    CmmLabelOff clbl i -> ppr clbl <> ppr_offset i
    CmmLabelDiffOff clbl1 clbl2 i -> ppr clbl1 <> char '-'
                                  <> ppr clbl2 <> ppr_offset i
    CmmBlock id        -> ppr id
    CmmHighStackMark -> text "<highSp>"