-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(v3.3.0) OCaml: camlp4o
Maintainer: Török Edwin [email protected]
ocamlc is a compiler for Caml. See the project's page for details.
The more reliable way to check for a single .ml file is to use ocamlc. You can do that setting this in your .vimrc:
let g:syntastic_ocaml_use_ocamlc = 1
It's possible to use ocamlc in conjuction with Jane Street's core. In order to do that, you have to specify something like this in your .vimrc:
let g:syntastic_ocaml_use_janestreet_core = 1
let g:syntastic_ocaml_janestreet_core_dir = '/path/to/core/dir'
Where path is the path to your core installation (usually a collection of .cmx and .cmxa files).
By default the camlp4o preprocessor is used to check the syntax of .ml, and .mli files,
ocamllex is used to check .mll files and menhir is used to check .mly files.
The output is all redirected to /dev/null
, nothing is written to the disk.
If your source code needs camlp4r then you can define this in your .vimrc:
let g:syntastic_ocaml_camlp4r = 1
If you used some syntax extensions, or you want to also typecheck the source code, then you can define this:
let g:syntastic_ocaml_use_ocamlbuild = 1
This will run ocamlbuild <name>.inferred.mli
, so it will write to your _build
directory (and possibly rebuild your myocamlbuild.ml
plugin), only enable this
if you are ok with that.
If you are using syntax extensions / external libraries and have a properly
set up _tags (and myocamlbuild.ml
file) then it should just work
to enable this flag and get syntax / type checks through syntastic.
For best results your current directory should be the project root
(same situation if you want useful output from :make
).