Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ast::Type pretty printer 💅 #165

Open
jmackie opened this issue Jan 6, 2023 · 0 comments
Open

ast::Type pretty printer 💅 #165

jmackie opened this issue Jan 6, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jmackie
Copy link
Member

jmackie commented Jan 6, 2023

Stop using debug_render and write proper formatting logic.

Probably belongs in ditto-fmt (e.g. ditto_fmt::format_type).

There should be a heuristic for unnamed type variable formatting that attempts to assign them single letter names (a, b, c, ...) avoiding collisions with existing named variables.

Types should ideally be printed with consideration for their typing Environment - i.e. they should be rendered as they would appear in the module source given the imports.

Use it for type errors, the LSP #142, generated docs #63 etc.

@jmackie jmackie added the enhancement New feature or request label Jan 6, 2023
@jmackie jmackie changed the title Pretty print types ast::Type pretty printer 💅 Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant