문제

I am wondering is it possible to only type-check an ml file? More precisely, I have a file a.ml that depends on b.cmi. How can I only type-check a.ml? Note that I don't have b.cmo, only b.cmi.

도움이 되었습니까?

해결책

ocamlc -i a.ml should work; it also returns the inferred interface.

Note that even if you don't have b.cmo, you can perfectly compile a.ml (this is what separate compilation is about) with ocamlc -c a.ml.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top