Skip to content
Newer
Older
100644 53 lines (40 sloc) 1.81 KB
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18
19 (**
20 Specific bsl processing for Ocaml files.
21
22 This module implements part of the bslregister process.
23
24 @author Mathieu Barbin
25 *)
26
27 (** *)
28 type ml_runtime = FBuffer.t
29 type ml_runtime_mli = FBuffer.t
30
31 (**
32 Bsl Preprocessing for Ocaml files.
33
34 This function is called at the end, once we have parsed all ocaml files,
35 the fonction implements a fold on decorated_files, for building
36 the runtime and the wanted interface (for checking).
37
38 The function should also perform calls to the Register API,
39 given as a record of type [BslPluginInterface.dynloader_interface],
40 which contains support for registering types and primitives.
41
42 The preprocess should respect the module hiearchy and keys names,
43 for beeing coherent with Js, but the actual implementation is free,
44 as long as the generated ml_runtime and ml_runtime_mli are coherent
45 with the impl used as argument for calling the dynload interface.
46 *)
47 val preprocess :
48 options:BslInterface.options ->
49 plugins:BslPluginInterface.plugin list ->
50 dynloader_interface:BslPluginInterface.dynloader_interface ->
51 BslDirectives.bypasslang_decorated_file list ->
52 BslPluginInterface.ocaml_env * ml_runtime * ml_runtime_mli
Something went wrong with that request. Please try again.