-
Notifications
You must be signed in to change notification settings - Fork 571
Print proxy type as an operator #3124
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
Conversation
| proxyType :: Pattern () Type (Type, Type) | ||
| proxyType = mkPattern match | ||
| where | ||
| match (ProxyType t) = Just (TypeConstructor (Qualified Nothing (ProperName "@")), t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting trick :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should add Prefix to pattern-arrows going forward, but I'm fine with this in the meantime. Could you please add a comment though?
|
Rebased and commented. Let me know if you want it to say something else. |
|
👍 Sounds good, thanks! |
This reverts commit cfd1db3.
* Revert "pretty print proxy types when rendering docs (#3144)" This reverts commit 14227c7. * Revert "Print proxy type as an operator (#3124)" This reverts commit cfd1db3. * Revert "Fix proxies: synonyms, inference, traversals, instances (#3095)" This reverts commit fe0aa0d. * Revert "Add proxies (#2846)" This reverts commit 74bc4a9. * Remove one last occurrence of the ProxyType constructor * Update tests to not use new proxies
* Revert "pretty print proxy types when rendering docs (purescript#3144)" This reverts commit 14227c7. * Revert "Print proxy type as an operator (purescript#3124)" This reverts commit cfd1db3. * Revert "Fix proxies: synonyms, inference, traversals, instances (purescript#3095)" This reverts commit fe0aa0d. * Revert "Add proxies (purescript#2846)" This reverts commit 74bc4a9. * Remove one last occurrence of the ProxyType constructor * Update tests to not use new proxies
Fixes #3076
Example input:
Output:
I originally also changed the parser so it treated
@as a prefix type operator that binds tighter than type application, but this caused problems with instances because@Intisn't a type-atom. E.g:instance foo :: Foo @twould have to have been written asinstance foo :: Foo (@t). So I reverted this.