Skip to content

Scoped type variables #347#866

Merged
paf31 merged 3 commits intomasterfrom
scoped-type-vars
Feb 12, 2015
Merged

Scoped type variables #347#866
paf31 merged 3 commits intomasterfrom
scoped-type-vars

Conversation

@paf31
Copy link
Copy Markdown
Contributor

@paf31 paf31 commented Feb 12, 2015

@garyb @joneshf Would you please review this?

High level overview:

  • Kind inference updated to peel off top-level foralls and return the kinds of their bound variables.
  • Skolems can now have their kind inferred, by using the handily stored type variable name they originated from.
  • withScopedTypeVars brings scoped type variable kinds into scope.
  • skolemizeTypesInValue updated to skolemize type annotations.

Still TODO:

  • Remove Type from ScopedTypeVar constructor.
  • Handle scoped type vars in let bindings.

@paf31
Copy link
Copy Markdown
Contributor Author

paf31 commented Feb 12, 2015

test-everything passes.

@joneshf
Copy link
Copy Markdown
Member

joneshf commented Feb 12, 2015

Seems alright, but I'm not too well versed in what's supposed to happen.

@garyb
Copy link
Copy Markdown
Member

garyb commented Feb 12, 2015

Looks great. Have you tested it much with shadowed type variable names?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 83.33% when pulling 2372665 on scoped-type-vars into d683d32 on master.

@paf31
Copy link
Copy Markdown
Contributor Author

paf31 commented Feb 12, 2015

@garyb Not really, but I can add a test.

@garyb
Copy link
Copy Markdown
Member

garyb commented Feb 12, 2015

It's probably fine, just wondered if there might be issues with that for things like the skolem kind inference. I'll have a play myself if I get a chance before you do.

@paf31
Copy link
Copy Markdown
Contributor Author

paf31 commented Feb 12, 2015

Something like this?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 83.33% when pulling 6e4870f on scoped-type-vars into d683d32 on master.

@garyb
Copy link
Copy Markdown
Member

garyb commented Feb 12, 2015

:shipit: 🎆

paf31 added a commit that referenced this pull request Feb 12, 2015
@paf31 paf31 merged commit 1321173 into master Feb 12, 2015
@paf31 paf31 deleted the scoped-type-vars branch February 12, 2015 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants