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

printing non-generalized type variables #8079

Closed
vicuna opened this Issue Mar 26, 2003 · 1 comment

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

vicuna commented Mar 26, 2003

Original bug ID: 1613
Reporter: administrator
Assigned to: @Octachron
Status: resolved (set by @Octachron on 2017-07-13T18:59:07Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 4.06.0 +dev/beta1/beta2/rc1
Category: typing
Related to: #2642
Monitored by: @gasche

Bug description

Full_Name: Hugo Herbelin
Version: 3.06
OS:
Submission from: arbois.inria.fr (128.93.11.104)

Hi,

The user-friendly names for non-generalized variable when using the -i option

are chosen on a per-function basis while a consistent naming throughout a same
file
would help debugging. Here is an example:

cat a.ml
let tab = ref []
let f g x = g (List.assoc x !tab)

ocamlc -i a.ml
val tab : ('_a * '_b) list ref
val f : ('_a -> 'b) -> '_c -> 'b

where _a in tab is _c in f and _b in tab is _a in f.

By the way, the link to node8.html on
http://caml.inria.fr/ocaml/problems.html
is broken (should be a link to manual022.html).

Thanks.

Hugo

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jul 13, 2017

Comment author: @Octachron

With the integration of #1225, this issue should be fixed in 4.06: the infered mli for the proposed example reads now as:

val tab : ('_weak1 * '_weak2) list ref
val f : ('_weak2 -> 'a) -> '_weak1 -> 'a

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.