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

Local modules remove polymorphism. #4511

vicuna opened this issue Feb 23, 2008 · 2 comments

Local modules remove polymorphism. #4511

vicuna opened this issue Feb 23, 2008 · 2 comments


Copy link

@vicuna vicuna commented Feb 23, 2008

Original bug ID: 4511
Reporter: jm
Assigned to: @garrigue
Status: closed (set by @garrigue on 2012-06-01T08:09:36Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 3.10+dev
Fixed in version: 4.00.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #4838
Monitored by: "Julien Signoles" @yakobowski

Bug description

% ocaml
Objective Caml version 3.10.2+dev3 (2008-01-29)

let ok = fun _ -> ();;

val ok : 'a -> unit =

let ko = let module M = struct end in fun _ -> ();;

val ko : '_a -> unit =

I think [ko] should have the signature 'a -> unit.

Copy link

@vicuna vicuna commented Mar 7, 2008

Comment author: @damiendoligez

What you propose is changing the value restriction to accept a local
module binding. Before we do that, we'll need to come up with a proof
that such a change is sound. Intuitively, I don't believe it's the

Copy link

@vicuna vicuna commented Jun 1, 2012

Comment author: @garrigue

Fixed in trunk and 4.00, revisions 12535, 12536.
The code was already there for first-class modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants