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

Toplevel: please add a primitive to compile a file as a module Test. #5825

vicuna opened this issue Nov 14, 2012 · 2 comments


Copy link

@vicuna vicuna commented Nov 14, 2012

Original bug ID: 5825
Reporter: hnrgrgr
Assigned to: meyer
Status: closed (set by @xavierleroy on 2015-12-11T18:21:15Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 4.01.0+dev
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #3121
Monitored by: @hcarty

Bug description

This bugs is a follow-up to a thread of the caml-list: .html

While testing/debugging some code with the OCaml toplevel, one may want to "#load" a module while keeping access to functions hidden by a .mli

The primitive "#use" already allow this, but when loading multiple files the "module-as-namespace" paradigm is not usable.

Here is a small patch that introduces a new primitive: #mod_use ""
It behaves as '#use ""', but wrap the content of '' in a module 'File'.

File attachments

Copy link

@vicuna vicuna commented Nov 18, 2012

Comment author: meyer

Patch looks good and applied, commit 13097 on trunk, thanks!

Documentation will still need updating so not closing it down yet.

Copy link

@vicuna vicuna commented Nov 19, 2012

Comment author: meyer

Now the documentation also up to date in commit 13098.

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
1 participant