Skip to content

Improve pretty-printing of nested projections on generic types #20

@MaximilianAlgehed

Description

@MaximilianAlgehed

We have code that's pretty-printed like this in the examples:

    assert $ ProdFstW (toSimpleRep v_10) ==. as_8
    assert $ ProdFstW (ProdSndW (toSimpleRep v_10)) ==. bs_7
    assert $ ProdSndW (ProdSndW (toSimpleRep v_10)) ==. m_6

and by giving a custom prettySymbol for ProdFstW and ProdSndW that recognizes this pattern we should be able
to rewrite this code to the following during pretty-printing:

    assert $ sel @0 v_10 ==. as_8
    assert $ sel @1 v_10 ==. bs_7
    assert $ sel @2 v_10 ==. m_6

This isn't a huge win here, but it's a considerably bigger win here where the nesting is much deeper than 2 or 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions