Simplify Core output with -dsuppress-type-signatures
authorÖmer Sinan Ağacan <omeragacan@gmail.com>
Mon, 24 Dec 2018 12:02:27 +0000 (15:02 +0300)
committerÖmer Sinan Ağacan <omeragacan@gmail.com>
Mon, 24 Dec 2018 12:02:39 +0000 (15:02 +0300)
commit8a0fca09565df99474568888253415f9bbe0fb68
tree56ca4015707cc1ef0a059705951d7b13eb94f913
parent5499f12f32a8deaa2a30c13359473b1178236341
Simplify Core output with -dsuppress-type-signatures

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

    $fEqHsExpr_$c/=
    $fEqHsExpr_$c/=
      = \ @ 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: https://phabricator.haskell.org/D5472
compiler/coreSyn/PprCore.hs
testsuite/tests/simplCore/should_compile/T16038/T16038.stdout
testsuite/tests/simplCore/should_compile/T5996.stdout