Skip to content
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

fix pr7103 #365

Merged
merged 1 commit into from Dec 22, 2015

Conversation

Projects
None yet
3 participants
@hhugo
Copy link
Contributor

commented Dec 21, 2015

Prevent printing just a type variable on one side of the clash

This is an attempt to resolve http://caml.inria.fr/mantis/view.php?id=7103
I have little confidence in this been the right change.

the following type error

Type a is not compatible with type 'a

should contain the constraint on 'a.

Type a is not compatible with type < .. > as 'a
Type a is not compatible with type [>``b] as 'a

@garrigue

This comment has been minimized.

Copy link
Contributor

commented Dec 21, 2015

I see. The change is actually pretty simple.
I what you want is to prevent printing just a type variable on one side of the clash, then this seems to be the right approach. I cannot guarantee that the result will always be optimal, but this seems to make sense.

@gasche

This comment has been minimized.

Copy link
Member

commented Dec 21, 2015

@garrigue , feel free to merge the patch (by cliking the green 'Merge pull request' button) if you think it can go in trunk.

@hhugo is not having a Changes entry intentional?

@hhugo

This comment has been minimized.

Copy link
Contributor Author

commented Dec 21, 2015

I was waiting for some feedback. I'll add an entry now

fix pr7103
the following type error

"Type a is not compatible with type 'a"

should contain the constraint on 'a.

"Type a is not compatible with type 'a = < .. >"
"Type a is not compatible with type 'a = [> `b]"

@hhugo hhugo force-pushed the hhugo:constraint branch from 8b05f3e to 1720d9f Dec 21, 2015

garrigue added a commit that referenced this pull request Dec 22, 2015

Merge pull request #365 from hhugo/constraint
Prevent printing just a type variable on one side of the clash (pr#7103)

@garrigue garrigue merged commit 83e3d1b into ocaml:trunk Dec 22, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@hhugo hhugo deleted the hhugo:constraint branch Dec 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.