Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 64 lines (51 sloc) 2.048 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 The imperative table where bsl pugins are stored.
21
22 @author Mathieu Barbin
23 @author Mehdi Bouaziz
24 *)
25
26 (**
27 Store a plugin in the table. Do not register any bypass yet anywhere,
28 just put the plugin in the common table.
29 *)
30 val store : BslPluginInterface.plugin -> unit
31
32 (**
33 The finalization will check if the dependancies of plugins are satisfied.
34 Example scenario : You have built a plugin [libB] using an other plugin [libA],
35 with a command like :
36 {[
37 $ bslregister -o libB myfile.ml myfile2.ml libA.opp
38 ]}
39 And then, you try to compile an opa file which uses some primitives from libB :
40 {[
41 $ opa.exe libB.opp myfile.opa
42 ]}
43 Then, you'll get an error when you finalize the plugin table, because the plugin
44 [libB] was built with a dependencie to the [libA], and you try to use
45 the [libB] without loading the [libA].
46
47 Add:
48 {[
49 $ opa.exe libB.opp libA.opp myfile.opa
50 ]}
51
52 Order of storing does not make any importance, the plugin are topologically sorted during the finalization,
53 and then returned in a topologic order in the returned list.
54
55 @error using standard OManager
56 *)
57 val finalize : unit -> BslPluginInterface.plugin list
58
59 (**
60 Returns the last result returned by [finalize], but without refinalizing.
61 If [finalize] was never called, returns [None]
62 *)
63 val last_finalize : unit -> BslPluginInterface.plugin list option
Something went wrong with that request. Please try again.