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

Equivalant variant types rejected #8400

Closed
vicuna opened this issue Dec 5, 2003 · 1 comment
Closed

Equivalant variant types rejected #8400

vicuna opened this issue Dec 5, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Dec 5, 2003

Original bug ID: 1963
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Henri Dubois-Ferriere
Version: 3.07+2
OS: RH7.2
Submission from: lcavpc14.epfl.ch (128.178.8.51)

test.mli:
type a = A | B

test.ml:
type a = B | A

The compiler complains that type a = A | B is not included in type a = B | A

Not a big deal, but they should be equivalent, no?

A similar problem situation occurse for a record type when the members are not
listed in the same order between the .ml and .mli.

@vicuna
Copy link
Author

vicuna commented Feb 14, 2004

Comment author: administrator

type t = A | B isn't "equivalent" to type t = B | A since the run-time
representations of A and B differ. Therefore, the proposed subtyping would be
unsound.

@vicuna vicuna closed this as completed Feb 14, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant