Skip to content
This repository
tag: v0.9.4
Fetching contributors…

Cannot retrieve contributors at this time

file 52 lines (40 sloc) 1.851 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
(*
Copyright © 2011 MLstate

This file is part of OPA.

OPA is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License, version 3, as published by
the Free Software Foundation.

OPA is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
more details.

You should have received a copy of the GNU Affero General Public License
along with OPA. If not, see <http://www.gnu.org/licenses/>.
*)

(**
Specific bsl processing for Ocaml files.

This module implements part of the bslregister process.

@author Mathieu Barbin
*)

(** *)
type ml_runtime = FBuffer.t
type ml_runtime_mli = FBuffer.t

(**
Bsl Preprocessing for Ocaml files.

This function is called at the end, once we have parsed all ocaml files,
the fonction implements a fold on decorated_files, for building
the runtime and the wanted interface (for checking).

The function should also perform calls to the Register API,
given as a record of type [BslPluginInterface.dynloader_interface],
which contains support for registering types and primitives.

The preprocess should respect the module hiearchy and keys names,
for beeing coherent with Js, but the actual implementation is free,
as long as the generated ml_runtime and ml_runtime_mli are coherent
with the impl used as argument for calling the dynload interface.
*)
val preprocess :
  options:BslInterface.options ->
  plugins:BslPluginInterface.plugin list ->
  dynloader_interface:BslPluginInterface.dynloader_interface ->
  BslDirectives.bypasslang_decorated_file list ->
  BslPluginInterface.ocaml_env * ml_runtime * ml_runtime_mli
Something went wrong with that request. Please try again.