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

Render builtin types with type variables #9

Open
hojberg opened this issue Oct 6, 2021 · 1 comment
Open

Render builtin types with type variables #9

hojberg opened this issue Oct 6, 2021 · 1 comment
Labels
enhancement New feature or request requires-backend-change snooze-3 Issue is likely to be worked on, might become "on-deck" in the next couple of months

Comments

@hojberg
Copy link
Member

hojberg commented Oct 6, 2021

There's a very specific set of builtin types in Unison and we can render them more nicely than builtin type.
For instance, base.List could be rendered as type List a (or perhaps builtin type List a). Showing type variables helps communicate how the builtins are constructed.

The full list of builtins are here: https://github.com/unisonweb/unison/blob/trunk/parser-typechecker/src/Unison/Builtin.hs#L153

Of those, these are the ones with type variables:

  • type MVar a
  • type TVar a
  • type Ref {g} a
  • ability Scope s
  • type Request {g} r
  • type List a

We can hard code this rendering in the UI for now.
Note that builtins have special hashes: like ##Nat for instance.

@hojberg hojberg added C3 labels Oct 6, 2021
@hojberg
Copy link
Member Author

hojberg commented Oct 8, 2021

After working with this for a bit, I'm starting to reconsider that this should exist in the UI.
Essentially the syntax being generated are like type "summaries" (see unisonweb/unison#2175), and implementing this as such in the backend seems like a better approach.

@hojberg hojberg transferred this issue from unisonweb/codebase-ui Jul 19, 2022
@hojberg hojberg added enhancement New feature or request and removed I2 labels Aug 20, 2022
@hojberg hojberg added the snooze-3 Issue is likely to be worked on, might become "on-deck" in the next couple of months label Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request requires-backend-change snooze-3 Issue is likely to be worked on, might become "on-deck" in the next couple of months
Projects
None yet
Development

No branches or pull requests

1 participant