Skip to content

Slow rendering of type error messages #1558

Open
@sjakobi

Description

@sjakobi

In #1496 (comment) @Gabriel439 described a case of a type error where the rendering of the type context was so slow he ended up turning it off completely (#1482).

However if you use --explain you still get the context, and have to wait.

I think there are at least two things that we can do about this:

  • Speed up prettyprinter: changesUponFlattening can be slow quchen/prettyprinter#99

  • Increase laziness in the rendered types: Right now we use snip to cut off the middle of the rendered types, keeping only the first and last 20 lines.
    I believe that if we'd limit ourselves to the first lines of the type, and use lazy Text instead of strict Text, we might be able to avoid rendering the full document.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions