X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FIfaceSyn.lhs;h=4ebebe09ff297a36c329f27439b178d89d8b1e73;hb=17434e5beb213f1e8971d1ce8ffbf40a0848bb3a;hp=cef2bf1e0fc724611df11eace80af6f853dfaef9;hpb=d78d04173296841b5949ebce640f444dcfb026f2;p=ghc-hetmet.git diff --git a/compiler/iface/IfaceSyn.lhs b/compiler/iface/IfaceSyn.lhs index cef2bf1..4ebebe0 100644 --- a/compiler/iface/IfaceSyn.lhs +++ b/compiler/iface/IfaceSyn.lhs @@ -384,21 +384,22 @@ pprIfaceExpr add_par e@(IfaceLam _ _) collect bs (IfaceLam b e) = collect (b:bs) e collect bs e = (reverse bs, e) --- gaw 2004 pprIfaceExpr add_par (IfaceCase scrut bndr ty [(con, bs, rhs)]) --- gaw 2004 - = add_par (sep [ptext SLIT("case") <+> char '@' <+> pprParendIfaceType ty <+> pprIfaceExpr noParens scrut <+> ptext SLIT("of") + = add_par (sep [ptext SLIT("case") <+> char '@' <+> pprParendIfaceType ty + <+> pprIfaceExpr noParens scrut <+> ptext SLIT("of") <+> ppr bndr <+> char '{' <+> ppr_con_bs con bs <+> arrow, pprIfaceExpr noParens rhs <+> char '}']) --- gaw 2004 pprIfaceExpr add_par (IfaceCase scrut bndr ty alts) --- gaw 2004 - = add_par (sep [ptext SLIT("case") <+> char '@' <+> pprParendIfaceType ty <+> pprIfaceExpr noParens scrut <+> ptext SLIT("of") + = add_par (sep [ptext SLIT("case") <+> char '@' <+> pprParendIfaceType ty + <+> pprIfaceExpr noParens scrut <+> ptext SLIT("of") <+> ppr bndr <+> char '{', nest 2 (sep (map ppr_alt alts)) <+> char '}']) -pprIfaceExpr add_par (IfaceCast expr co) = add_par (ptext SLIT("cast") <+> ppr expr <+> ppr co) +pprIfaceExpr add_par (IfaceCast expr co) + = sep [pprIfaceExpr parens expr, + nest 2 (ptext SLIT("`cast`")), + pprParendIfaceType co] pprIfaceExpr add_par (IfaceLet (IfaceNonRec b rhs) body) = add_par (sep [ptext SLIT("let {"), @@ -754,7 +755,7 @@ type EqEnv = UniqFM FastString -- Tracks the mapping from L-variables to R-varia eqIfOcc :: EqEnv -> FastString -> FastString -> IfaceEq eqIfOcc env n1 n2 = case lookupUFM env n1 of Just n1 -> bool (n1 == n2) - Nothing -> bool (n1 == n2) + Nothing -> bool (show n1 == show n2) extendEqEnv :: EqEnv -> FastString -> FastString -> EqEnv extendEqEnv env n1 n2 | n1 == n2 = env