oasis icon indicating copy to clipboard operation
oasis copied to clipboard

option to generate interface files

Open gildor478 opened this issue 4 years ago • 0 comments

This feature request has been migrated from artifact #1299 on forge.ocamlcore.org. It was assigned to user102.

user214 posted on 2013-07-27 18:53:22:

ocamlc has the nice option -i to output all defined names (with their inferred types or their definitions) when compiling an implementation (.ml file). This can be used as template for the .mli file or simply to check the resulting types are sane.

It would be nice if oasis had an option to run ocamlc -i for a) every *.ml file or b) only *.ml files without *.mli.

A further step would be to use those file to compile .cmi files only when they changed. This would allow the cmi file to remain unchanged when the ml file changed but did not change its interface.

user144 replied on 2015-07-04 08:37:54:

I do not see the point of this. If the .mli file are to be distributed, they should also be documented, so ocamlc -i would only be a starting point. If they are for internal purposes only (not sure why), a devel build target in a Makefile would suffice.

gildor478 avatar Oct 24 '20 16:10 gildor478