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 test.ml as a module Test. #5825

Closed
vicuna opened this Issue Nov 14, 2012 · 2 comments

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

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:

https://sympa.inria.fr/sympa/arc/caml-list/2012-11/msg00021 .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 "file.ml"
It behaves as '#use "file.ml"', but wrap the content of 'file.ml' in a module 'File'.

File attachments

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

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
You can’t perform that action at this time.