Skip to content

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

Merged
paf31 merged 1 commit into
masterfrom
810
Feb 3, 2015
Merged

paf31 merged 1 commit into
masterfrom
810

Conversation

@paf31

@paf31 paf31 commented Feb 3, 2015

Copy link
Copy Markdown
Contributor

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

@garyb

garyb commented Feb 3, 2015

Copy link
Copy Markdown
Member

👍

@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

joneshf commented Feb 3, 2015

Copy link
Copy Markdown
Member

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

paf31 commented Feb 3, 2015

Copy link
Copy Markdown
Contributor Author

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

joneshf commented Feb 3, 2015

Copy link
Copy Markdown
Member

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