Search code examples
ocamlbytecodeprimitive

CAMLprim, CAMLexport, CAMLextern


Where can I find the complete list of OCaml primitives implemented in C? Is it enough to grep 'CAMLprim' <ocamlsourcetree>/byterun/*.c, or I have to look for CAMLexport and CAMLextern too, or what else?

(note: looking for external declarations in .ml,.mli files is not enough, because I need also all caml_* primitives referred by bytecomp/translcore.ml for special %someide externals)


Solution

  • You can use:

    ocamlrun -p
    

    to get the full list of primitives available in the default runtime.