Commit 8a0fca09 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan

Simplify Core output with -dsuppress-type-signatures

Currently we duplicate top-level binder ids for no reason:

      = \ @ id_a27U $dEq_a27V eta_B2 eta1_B1 ->
          case $fEqHsExpr_$c== $dEq_a27V eta_B2 eta1_B1 of {
            False -> True;
            True -> False

with this patch we drop the first line when type signatures are not
printed (-dsuppress-type-signatures, which is implied by -dsuppress-all)

Reviewers: simonpj, bgamari

Reviewed By: simonpj

Subscribers: rwbarton, carter

Differential Revision:
parent 5499f12f
......@@ -115,7 +115,13 @@ ppr_bind ann (Rec binds) = vcat (map pp binds)
ppr_binding :: OutputableBndr b => Annotation b -> (b, Expr b) -> SDoc
ppr_binding ann (val_bdr, expr)
= ann expr $$ pprBndr LetBind val_bdr $$ pp_bind
= sdocWithDynFlags $ \dflags ->
vcat [ ann expr
, if gopt Opt_SuppressTypeSignatures dflags
then empty
else pprBndr LetBind val_bdr
, pp_bind
pp_bind = case bndrIsJoin_maybe val_bdr of
Nothing -> pp_normal_bind
Rec {
end Rec }
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