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

ocamlbuild should support -intf -impl and -intf-suffix #6949

Closed
vicuna opened this issue Aug 2, 2015 · 2 comments
Closed

ocamlbuild should support -intf -impl and -intf-suffix #6949

vicuna opened this issue Aug 2, 2015 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Aug 2, 2015

Original bug ID: 6949
Reporter: jordojw
Status: resolved (set by @damiendoligez on 2017-03-01T10:44:46Z)
Resolution: open
Priority: normal
Severity: feature
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @hcarty

Bug description

According to the mailing list, it seems there may be no way to instruct ocamlbuild that certain suffixes should be treated like interfaces or implementations, and in the event that they are treated as such, how to resolve the respective interfaces:

Specifically, here is how all of the ocamlc/ocamldep/* suite of commands should be effected by the file extension:

/.xyz

ocamlc/ocamldep -pp convertXyzProgram -impl theFile.xyz -intf-suffix xyzi

/.xyzi

ocamlc/ocamldep -pp convertXyzProgram -intf theFile.xyzi

Gabriel Scherer suggested that I file an issue here, and that it wouldn't be too difficult to implement this in ocamlbuild.

@vicuna
Copy link
Author

vicuna commented Aug 2, 2015

Comment author: jordojw

This can currently be accomplished by moving .xyz/xyzi files to .ml/.mli files respectively in a myocamlbuild rule, however this results in incorrect error messages.

Gabriel suggested a lexer preprocessor rule to fool ocaml's compiler into reporting errrors in terms of the original source file, even if renamed to a .ml.

@vicuna
Copy link
Author

vicuna commented Mar 1, 2017

Comment author: @damiendoligez

ocamlbuild is now a separate project that lives on GitHub.
PR transferred to ocaml/ocamlbuild#183

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

1 participant