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

Use module aliases instead of packs. #131

Open
jordwalke opened this issue May 17, 2015 · 5 comments
Open

Use module aliases instead of packs. #131

jordwalke opened this issue May 17, 2015 · 5 comments

Comments

@jordwalke
Copy link

It's known that module aliases increase build speed because they don't need to re-include the entire module implementation.

My project CommonML, uses module aliases to accomplish namespacing and I'd love to see obuild do the same:

https://github.com/jordwalke/commonml

@UnixJunkie
Copy link

What do you mean?
Do you want the code of obuild to be changed because obuild doesn't build fast enough?

@jeromemaloberti
Copy link
Contributor

No, obuild makes packs for libraries, with recent versions of ocaml, it could use module aliases, which is much faster at link time, afaik.
It is a good idea, I guess I just need to figure out from which version of ocaml module aliases are available, and what is the cli invocation.

@UnixJunkie
Copy link

I see from version 4.02.0 byJacques Garrigue in this file:
http://caml.inria.fr/pub/distrib/ocaml-4.02/notes/Changes

@UnixJunkie
Copy link

@jordwalke
Copy link
Author

You can see how I do it in CommonML - just look at the log output when it compiles the examples.
https://github.com/jordwalke/commonml

Basically, if you invoke the right compilation commands, you get the equivalent of pack namespacing according to file name.

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

No branches or pull requests

3 participants