Skip to content

Enhance nested TransCo pretty-printing

Sylvain Henry requested to merge hsyl20/ghc:hsyl20/ppr/transco into master

Nested TransCo were printed with a lot of indentation, e.g.:

    `cast` (Sub (Sym (Foo.D:R:Index[0] <Bool>_N <'[]>_N)) ; ((Index
                                                                (Sym (SubDef (<1>_N,
                                                                              <1>_N)))
                                                                <'[Bool]>_N)_R ; ...

With this patch we print them as follows:

    `cast` (Sub (Sym (Foo.D:R:Index[0] <Bool>_N <'[]>_N))
            ; (Index (Sym (SubDef (<1>_N, <1>_N))) <'[Bool]>_N)_R
            ; Sub (Sym (Foo.D:R:Index[1] <1>_N <Int>_N <'[Bool]>_N))
            ; (Index (Sym (SubDef (<2>_N, <1>_N))) <'[Int, Bool]>_N)_R

Merge request reports