[ocaml-platform] Idea: use (possibly extended) toplevel directives as source headers

Simon Cruanes simon.cruanes.2007 at m4x.org
Tue Mar 19 12:28:31 GMT 2013


On 03/19/2013 12:29 PM, Gabriel Scherer wrote:
> Note that "#require" is not specified in the OCaml manual, it is a
> de-facto standard introduced by ocamlfind. I think have such explicit
> "import" support could be fairly useful for tooling (see all the nice
> things the "go" tool allows for users of the Go programming language),
> but I'm not sure it should be standardized as explicitly referring to
> the ocamlfind tool, or a more abstract notion of "package" that could
> also please the serious industrial users that maybe don't use
> ocamlfind internally (I have no idea).

My two cents: I think it's important to settle on a given way to deal
with one library system, especially given that findlib seems to be *the*
reference in OCaml. Findlib should be shipped with ocaml, and ocamlc/opt
being aware of findlib is not only acceptable, it's a good thing.

So, allowing #require in the preamble of a source file pleases me (also
being able to specify inlining level for some functions directly in the
source ;)).

Simon



More information about the Platform mailing list