- Notifications
You must be signed in to change notification settings - Fork572
Local type synonyms#3897
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Local type synonyms#3897
Uh oh!
There was an error while loading.Please reload this page.
Conversation
a186be0
to4068600
CompareFor things like this, I recommend using the
So the particular unification variable in the error definitely exists. The reason for the error is that The apparent complexity of
The I don't think that I'm going to guess that |
4068600
to24135e0
Compare@natefaubion Thank you so much! That was immensely useful. There are likely a few more edge cases that I haven't yet tested and fixed, but this is now mostly functional. |
moduleName <- unsafeCheckCurrentModule | ||
(kind', ty') <- warnAndRethrow (addHint (ErrorInTypeSynonym name) . addHint (positionedError ss)) $ do | ||
checkDuplicateTypeArguments $ map fst args | ||
traverse replaceAllTypeSynonyms . swap =<< kindOfLocalTypeSynonym moduleName (sa, name, args, ty) |
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.
Does there need to be anintroduceSkolemScope
in here? I tried it with and without and it didn't seem to make a difference on any tests I could come up with, but it seems to be paired with all the otherreplaceAllTypeSynonyms
s in this file.
We need to support local synonyms in the shadowing lint for both:
|
For the first case: |
If the types work out, I say reuse it, otherwise a new one. |
Warnings have been added! Most of them were not put in the |
9b529a0
to2a4666e
Compare2a4666e
toe83181d
Compare56baea1
to953acb5
Compare953acb5
to7a60917
Compare7a60917
to06a803a
Compareddfb171
to4f80996
Compare4f80996
to01d8100
Compare01d8100
toe15414c
Comparee15414c
to3e2e2a1
Compare3e2e2a1
to84242a5
Compare
Uh oh!
There was an error while loading.Please reload this page.
This is an implementation of#3708 (the ‘native’ implementation; I've abandoned the desugaring approach). I consider it largely if not entirely complete; there may be bugs but in a couple of years of using this atop various versions of PureScript I haven't encountered them. It's only a draft because we haven't arrived at a consensus that#3708 should be implemented.
(Previously this initial comment was a plea for help with an issue that has long since been resolved; anyone who's really curious can look through the edit history but I felt it was misleading to have that be the initial representation of this PR at the current time.)
Closes#3708.