X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FPprCmm.hs;h=43f39353afa8c21ead7c11ba1872febcbceefd72;hb=4f92da533cd1c7b5f41ef8794ee6a284f1680413;hp=470b325a6485ac7a0a08e29ef23de2bb510cb30d;hpb=b822c1e46cd64d1dba23fbab0f775b731bf0f12b;p=ghc-hetmet.git diff --git a/compiler/cmm/PprCmm.hs b/compiler/cmm/PprCmm.hs index 470b325..43f3935 100644 --- a/compiler/cmm/PprCmm.hs +++ b/compiler/cmm/PprCmm.hs @@ -71,8 +71,8 @@ writeCmms handle cmms = printForC handle (pprCmms cmms) ----------------------------------------------------------------------------- -instance (Outputable info, Outputable g) - => Outputable (GenCmm CmmStatic info g) where +instance (Outputable d, Outputable info, Outputable g) + => Outputable (GenCmm d info g) where ppr c = pprCmm c instance (Outputable d, Outputable info, Outputable i) @@ -110,7 +110,7 @@ instance Outputable CmmInfo where ----------------------------------------------------------------------------- -pprCmm :: (Outputable info, Outputable g) => GenCmm CmmStatic info g -> SDoc +pprCmm :: (Outputable d, Outputable info, Outputable g) => GenCmm d info g -> SDoc pprCmm (Cmm tops) = vcat $ intersperse (text "") $ map pprTop tops -- -------------------------------------------------------------------------- @@ -284,7 +284,7 @@ genCondBranch expr ident = -- -- jump foo(a, b, c); -- -genJump :: CmmExpr -> [(CmmExpr, MachHint)] -> SDoc +genJump :: CmmExpr -> [CmmHinted CmmExpr] -> SDoc genJump expr args = hcat [ ptext SLIT("jump") @@ -298,18 +298,18 @@ genJump expr args = , parens ( commafy $ map pprHinted args ) , semi ] -pprHinted :: Outputable a => (a, MachHint) -> SDoc -pprHinted (a, NoHint) = ppr a -pprHinted (a, PtrHint) = quotes(text "address") <+> ppr a -pprHinted (a, SignedHint) = quotes(text "signed") <+> ppr a -pprHinted (a, FloatHint) = quotes(text "float") <+> ppr a +pprHinted :: Outputable a => (CmmHinted a) -> SDoc +pprHinted (CmmHinted a NoHint) = ppr a +pprHinted (CmmHinted a PtrHint) = quotes(text "address") <+> ppr a +pprHinted (CmmHinted a SignedHint) = quotes(text "signed") <+> ppr a +pprHinted (CmmHinted a FloatHint) = quotes(text "float") <+> ppr a -- -------------------------------------------------------------------------- -- Return from a function. [1], Section 6.8.2 of version 1.128 -- -- return (a, b, c); -- -genReturn :: [(CmmExpr, MachHint)] -> SDoc +genReturn :: [CmmHinted CmmExpr] -> SDoc genReturn args = hcat [ ptext SLIT("return")