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

Contravariance lost with ocamlc -i #4988

Closed
vicuna opened this Issue Feb 28, 2010 · 2 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

vicuna commented Feb 28, 2010

Original bug ID: 4988
Reporter: yziquel
Assigned to: @garrigue
Status: closed (set by @garrigue on 2010-04-30T03:10:08Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.2
Fixed in version: 3.11.2
Category: ~DO NOT USE (was: OCaml general)
Monitored by: yziquel mehdi @glondu

Bug description

Here's the .ml file:

yziquel@seldon:~/sandbox$ cat t.ml
type untyped
type 'a typed = private untyped
type -'typing tau = private obj
and 'a t = 'a typed tau
and obj = private untyped tau

Here's the infered .mli:

yziquel@seldon:~/sandbox$ ocamlc -i t.ml
type untyped
type 'a typed = private untyped
type 'a tau = private obj
and 'a t = 'a typed tau
and obj = private untyped tau

The contravariance on tau is lost in the signature declaration.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Mar 5, 2010

Comment author: @garrigue

fixed in typing/printtyp.ml

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Apr 30, 2010

Comment author: @garrigue

Already fixed, now close.

@vicuna vicuna closed this Apr 30, 2010

@vicuna vicuna added the bug label Mar 20, 2019

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.