Skip to content

Fix #810 and #814: don't infer polymorphic types for data constructors.#835

Merged
paf31 merged 1 commit intomasterfrom
810
Feb 3, 2015
Merged

Fix #810 and #814: don't infer polymorphic types for data constructors.#835
paf31 merged 1 commit intomasterfrom
810

Conversation

@paf31
Copy link
Copy Markdown
Contributor

@paf31 paf31 commented Feb 3, 2015

@garyb @joneshf Could you please review? test-everything passes, and the code in #814 now builds.

@garyb
Copy link
Copy Markdown
Member

garyb commented Feb 3, 2015

👍

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.11%) to 83.3% when pulling f89b14f on 810 into 5061808 on master.

paf31 added a commit that referenced this pull request Feb 3, 2015
Fix #810 and #814: don't infer polymorphic types for data constructors.
@paf31 paf31 merged commit 18f3004 into master Feb 3, 2015
@paf31 paf31 deleted the 810 branch February 3, 2015 16:31
@joneshf
Copy link
Copy Markdown
Member

joneshf commented Feb 3, 2015

Just to be sure what this fixes. Is this a fix for that bug where you have a Nothing say, that isn't at the top level, and the compiler tries to infer Maybe a when it should infer Maybe String or something?

@paf31
Copy link
Copy Markdown
Contributor Author

paf31 commented Feb 3, 2015

Yes, in inference mode, the typechecker will now not infer the polymorphic type forall a. Maybe a for the expression Nothing, for example. In checking mode, nothing has changed.

@joneshf
Copy link
Copy Markdown
Member

joneshf commented Feb 3, 2015

Cool. Thanks!

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