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

toplevels built with ocamlmktop should automatically get -I dirs added to #directory list #4672

vicuna opened this issue Dec 16, 2008 · 0 comments


None yet
1 participant
Copy link

commented Dec 16, 2008

Original bug ID: 4672
Reporter: warren
Status: acknowledged (set by @damiendoligez on 2009-04-27T14:54:20Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.10.2
Category: tools (ocaml{lex,yacc,dep,debug,...})
Monitored by: @glondu bacam

Bug description

When ocamlmktop is used to create a toplevel, the -I

argument can be used to supply directories to the search path for .cmi files. However, when the toplevel is run, these directories must be supplied once again. It would be nice if the toplevel that is built would remember these directories.

In practice, I've found new users to be confused by the current behavior. The purpose of creating a toplevel is to create a stand-alone interpreter with all the needed modules pre-linked. However, without supplying the -I directories again (or by supplying them via #directory directives), these modules can't be opened even though their code is included in the toplevel. An "Unbound module" error will result.

As an alternative, perhaps the contents of the .cmi files needed by any linked-in modules could be included in the toplevel automatically. This would avoid the need to search any directories to find them when the toplevel is run. This would make the toplevel more self-contained.

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.