Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 58 lines (46 sloc) 2.005 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 Loading the standard library.
20 *)
21
22 (**
23 The stdlib can be loaded in two ways.
24
25 1) [of_static_include]
26 This is the default one, it works as follows:
27
28 - A [staticsInclude.of] file is generated by the build system (see
29 ../build_rules.ml), automatically selecting files to be included from the
30 stdlib directory
31 - ofile is used to turn the [staticsInclude.of] into [staticsInclude.ml],
32 embedding all stdlib source as strings (this is done by the generic ofile
33 build rule)
34 - the [StaticsInclude] module is included in [opalib.cmxa] and used at
35 compile-time
36 - the mechanism in the current module enables to switch between different
37 (conflicting) versions for some stdlib files
38
39 2) [of_basedir]
40 The second version dynamically looks for the files at opa compile-time (ie ml runtime).
41 Only use for more easily testing your changes to the stdlib. It uses the [of_basedir]
42 function below.
43 *)
44
45 type filename = string
46
47 (**
48 Returns all the filenames of the stdlib embedded in the compiler.
49 cf [build_rules.ml], we access the [StaticsInclude.file_list],
50 and applying the dynamic filter.
51 *)
52 val of_static_include : OpaEnv.opa_options -> filename list
53
54 (**
55 Get all the opafiles from the basedir, and applying the same dynamic filter.
56 *)
57 val of_basedir : filename list -> OpaEnv.opa_options -> filename list
Something went wrong with that request. Please try again.