Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 261 lines (187 sloc) 8.135 kb
d72de1d @samoht More cleanups
samoht authored
1 (***********************************************************************)
2 (* *)
3 (* Copyright 2012 OCamlPro *)
4 (* Copyright 2012 INRIA *)
5 (* *)
6 (* All rights reserved. This file is distributed under the terms of *)
7 (* the GNU Public License version 3.0. *)
8 (* *)
9 (* TypeRex is distributed in the hope that it will be useful, *)
10 (* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
11 (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
12 (* GNU General Public License for more details. *)
13 (* *)
14 (***********************************************************************)
15
e04535c @samoht Add API documentation
samoht authored
16 (** Typed filename management. *)
17
d72de1d @samoht More cleanups
samoht authored
18 open Types
19
20 (** Compiler-version related state *)
093774d @samoht [switch] Store .comp files in OPAM repositories as well
samoht authored
21 module C: sig
d72de1d @samoht More cleanups
samoht authored
22
e04535c @samoht Add API documentation
samoht authored
23 (** Contains {i $opam} and {i $OVERSION} *)
d72de1d @samoht More cleanups
samoht authored
24 type t
39771d6 @samoht Init / Update / Upload works
samoht authored
25
26 (** Create a compiler path *)
0492aae @samoht [switch] More improvments
samoht authored
27 val create: Alias.t -> t
d72de1d @samoht More cleanups
samoht authored
28
6b3599b @tuong Merge branch 'release-0.1' of github.com:OCamlPro/opam into release-0.1
tuong authored
29 (** Root dir: {i $opam/$OVERSION} *)
266147b @samoht API simplification
samoht authored
30 val root: t -> dirname
31
469889d @samoht [init] installing a default package at startup containing global variabl...
samoht authored
32 (** Library path for a given package:
e04535c @samoht Add API documentation
samoht authored
33 {i $opam/$OVERSION/lib/NAME} *)
d72de1d @samoht More cleanups
samoht authored
34 val lib: t -> N.t -> dirname
35
469889d @samoht [init] installing a default package at startup containing global variabl...
samoht authored
36 (** Library path: {i $opam/$OVERSION/lib/} *)
37 val lib_dir: t -> dirname
139ea89 @samoht Creat $lib/stublibs to store shared C libraries
samoht authored
38
39 (** DLL paths *)
40 val stublibs: t -> dirname
469889d @samoht [init] installing a default package at startup containing global variabl...
samoht authored
41
c21d461 @samoht Add stublibs and toplevel variables in the configuration package, so pac...
samoht authored
42 (** toplevel path: {i $opam/$OVERSION/lib/toplevel} *)
43 val toplevel: t -> dirname
44
0b9d1a2 @samoht Add $doc to conf-ocaml variables
samoht authored
45 (** Documentation path for a given package:
46 {i $opam/$OVERSION/doc/NAME} *)
47 val doc: t -> N.t -> dirname
48
49 (** Documentation path: {i $opam/$OVERSION/doc/} *)
50 val doc_dir: t -> dirname
51
e04535c @samoht Add API documentation
samoht authored
52 (** Installed binaries: {i $opam/$OVERSION/bin} *)
d72de1d @samoht More cleanups
samoht authored
53 val bin: t -> dirname
54
4614514 @samoht init / update seems to work
samoht authored
55 (** List of installed packages with their version:
e04535c @samoht Add API documentation
samoht authored
56 {i $opam/$OVERSION/installed} *)
d72de1d @samoht More cleanups
samoht authored
57 val installed: t -> filename
58
4458cfa @tuong complete the specification about "opam switch"
tuong authored
59 (** Tempory folders used to decompress and compile
60 the corresponding archives:
e04535c @samoht Add API documentation
samoht authored
61 {i $opam/$OVERSION/build/$NAME-$VERSION} *)
d72de1d @samoht More cleanups
samoht authored
62 val build: t -> NV.t -> dirname
63
7892d49 @tuong Towards the complete support of "opam switch".
tuong authored
64 (** Tempory folders used to decompress and compile
65 the OCaml compiler:
66 {i $opam/$OVERSION/build/_} *)
67 val build_ocaml: t -> dirname
68
e04535c @samoht Add API documentation
samoht authored
69 (** Tempory folder: {i $opam/$OVERSION/build} *)
d72de1d @samoht More cleanups
samoht authored
70 val build_dir: t -> dirname
71
516f6ce @samoht Generate $name.env files containing the environments variables in the di...
samoht authored
72 (** A file containing the env variables in which build command are
73 processed: {i $opam/$OVERSION/build/$NAME.$VERSION/$NAME.env} *)
74 val build_env: t -> NV.t -> filename
75
76 (** A file containing a copy of the current env variables, before
77 the env variables for the build are set:
78 {i $opam/$OVERSION/build/$NAME.$VERSION/$NAME.old.env} *)
79 val build_old_env: t -> NV.t -> filename
80
6356ece @samoht Packages can now be installed and removed.
samoht authored
81 (** Tempory location of install files:
e04535c @samoht Add API documentation
samoht authored
82 {i $opam/$OVERSION/build/$NAME.$VERSION/$NAME.install} *)
6356ece @samoht Packages can now be installed and removed.
samoht authored
83 val build_install: t -> NV.t -> filename
84
469889d @samoht [init] installing a default package at startup containing global variabl...
samoht authored
85 (** Tempory location of config files: {i
86 $opam/$OVERSION/build/$NAME.$VERSION/$NAME.config} *)
6356ece @samoht Packages can now be installed and removed.
samoht authored
87 val build_config: t -> NV.t -> filename
88
4614514 @samoht init / update seems to work
samoht authored
89 (** Installed files for a given package:
e04535c @samoht Add API documentation
samoht authored
90 {i $opam/$OVERSION/install/$NAME.install} *)
d72de1d @samoht More cleanups
samoht authored
91 val install: t -> N.t -> filename
92
e04535c @samoht Add API documentation
samoht authored
93 (** Installed files: {i $opam/$OVERSION/install/} *)
d72de1d @samoht More cleanups
samoht authored
94 val install_dir: t -> dirname
95
4614514 @samoht init / update seems to work
samoht authored
96 (** Packages to reinstall on next upgrade:
e04535c @samoht Add API documentation
samoht authored
97 {i $opam/$OVERSION/reinstall} *)
d72de1d @samoht More cleanups
samoht authored
98 val reinstall: t -> filename
99
100 (** Compile and link flags for a given package:
e04535c @samoht Add API documentation
samoht authored
101 {i $opam/$OVERSION/config/$NAME.config} *)
d72de1d @samoht More cleanups
samoht authored
102 val config: t -> N.t -> filename
103
e04535c @samoht Add API documentation
samoht authored
104 (** Configuration folder: {i $opam/$OVERSION/config} *)
d72de1d @samoht More cleanups
samoht authored
105 val config_dir: t -> dirname
106
8ca92a9 @samoht [pin] first version of 'opam pin'
samoht authored
107 (** Pinned package file *)
108 val pinned: t -> filename
d72de1d @samoht More cleanups
samoht authored
109 end
110
abf6884 @tuong permute [G] and [C], semantic remains preserved
tuong authored
111 (** Global state *)
112 module G: sig
113
114 (** Contains {i $opam} *)
115 type t
116
117 (** Create a global path *)
118 val create: unit -> t
119
120 (** Root dir: {i $opam/} *)
121 val root: t -> dirname
122
123 (** Main configuration file: {i $opam/config} *)
124 val config: t -> filename
125
126 (** Compiler aliases *)
127 val aliases: t -> filename
128
129 (** OPAM files: {i $opam/opam/$NAME.$VERSION.opam} *)
130 val opam: t -> NV.t -> filename
131
132 (** Compiler files: {i $opam/compilers/$OVERSION.comp} *)
133 val compiler: t -> OCaml_V.t -> filename
134
135 (** Compiler files: {i $opam/compilers/} *)
136 val compiler_dir: t -> dirname
137
138 (** All the compiler files *)
139 val compiler_list: t -> OCaml_V.Set.t
140
141 (** List all the available packages:
142 {i $opam/opam/$NAME.$VERSION.opam} *)
143 val available: t -> NV.Set.t
144
145 (** List all the available packages:
146 {i $opam/opam/$NAME.$VERSION.opam} *)
147 val available_versions: t -> N.t -> V.Set.t
148
149 (** Description file: {i $opam/descr/$NAME.$VERSION} *)
150 val descr: t -> NV.t -> filename
151
152 (** Archives files: {i $opam/archives/$NAME.$VERSION.tar.gz} *)
153 val archive: t -> NV.t -> filename
154
155 (** OPAM files folder: {i $opam/opam/} *)
156 val opam_dir: t -> dirname
157
158 (** Description files folder: {i $opam/descr/} *)
159 val descr_dir: t -> dirname
160
161 (** Archives files folder: {i $opam/archives/} *)
162 val archive_dir: t -> dirname
163
164 (** Return the repository index: {i $opam/repo/index} *)
165 val repo_index: t -> filename
166
b9a3063 @tuong fix the computation of $oversion/reinstall
tuong authored
167 (** Folding on available compiler, including the one that is currently set.
168 The order of folding on version is not precised. *)
169 val fold_compiler: ('a -> C.t -> 'a) -> 'a -> t -> 'a
170
abf6884 @tuong permute [G] and [C], semantic remains preserved
tuong authored
171 end
172
173 (** Repository related *)
093774d @samoht [switch] Store .comp files in OPAM repositories as well
samoht authored
174 module R: sig
d72de1d @samoht More cleanups
samoht authored
175
176 type t
177
178 (** Create a repository path *)
bd3a033 @samoht [repo-server] read/write OPAM server can now be used as a repository plu...
samoht authored
179 val create: repository -> t
d72de1d @samoht More cleanups
samoht authored
180
181 (** Transform a directory name into a repository path *)
182 val of_path: dirname -> t
183
e04535c @samoht Add API documentation
samoht authored
184 (** Return the repository folder: {i $opam/repo/$repo} *)
d72de1d @samoht More cleanups
samoht authored
185 val root: t -> dirname
186
e04535c @samoht Add API documentation
samoht authored
187 (** Return the repository config: {i $opam/repo/$repo/config} *)
d72de1d @samoht More cleanups
samoht authored
188 val config: t -> filename
189
190 (** Return the OPAM file for a given package:
e04535c @samoht Add API documentation
samoht authored
191 {i $opam/repo/$repo/opam/$NAME.$VERSION.opam} *)
d72de1d @samoht More cleanups
samoht authored
192 val opam: t -> NV.t -> filename
193
e04535c @samoht Add API documentation
samoht authored
194 (** Return the OPAM folder: {i $opam/repo/$repo/opam/} *)
d72de1d @samoht More cleanups
samoht authored
195 val opam_dir: t -> dirname
196
197 (** List all the available packages:
e04535c @samoht Add API documentation
samoht authored
198 {i $opam/repo/$repo/$NAME.$VERSION.opam} *)
d72de1d @samoht More cleanups
samoht authored
199 val available: t -> NV.Set.t
200
4614514 @samoht init / update seems to work
samoht authored
201 (** List all the available versions for a given package:
e04535c @samoht Add API documentation
samoht authored
202 {i $opam/repo/$repo/$name.$VERSION.opam} *)
4614514 @samoht init / update seems to work
samoht authored
203 val available_versions: t -> N.t -> V.Set.t
204
d72de1d @samoht More cleanups
samoht authored
205 (** Return the description file for a given package:
e04535c @samoht Add API documentation
samoht authored
206 {i $opam/repo/$repo/descr/$NAME.VERSION} *)
d72de1d @samoht More cleanups
samoht authored
207 val descr: t -> NV.t -> filename
208
209 (** Return the description folder *)
210 val descr_dir: t -> dirname
211
212 (** Return the archive for a giben package:
e04535c @samoht Add API documentation
samoht authored
213 {i $opam/repo/$repo/archives/$NAME.$VERSION.tar.gz} *)
d72de1d @samoht More cleanups
samoht authored
214 val archive: t -> NV.t -> filename
215
e04535c @samoht Add API documentation
samoht authored
216 (** Return the archive folder: {i $opam/repo/$repo/archives/} *)
d72de1d @samoht More cleanups
samoht authored
217 val archive_dir: t -> dirname
218
219 (** Return the list of updated packages:
e04535c @samoht Add API documentation
samoht authored
220 {i $opam/repo/$repo/updated} *)
d72de1d @samoht More cleanups
samoht authored
221 val updated: t -> filename
222
223 (** Return the upload folder for a given version:
e04535c @samoht Add API documentation
samoht authored
224 {i $opam/repo/$repo/upload/} *)
39771d6 @samoht Init / Update / Upload works
samoht authored
225 val upload: t -> dirname
d72de1d @samoht More cleanups
samoht authored
226
227 (** Return the upload folder for OPAM files:
bd3a033 @samoht [repo-server] read/write OPAM server can now be used as a repository plu...
samoht authored
228 {i $opam/repo/$repo/upload/opam/}*)
229 val upload_opam_dir: t -> dirname
230
231 (** Return the upload folder for descr files:
232 {i $opam/repo/$repo/upload/descr/} *)
233 val upload_descr_dir: t -> dirname
234
235 (** Return the upload folder for archive files:
236 {i $opam/repo/$repo/upload/archives/} *)
237 val upload_archives_dir: t -> dirname
238
239 (** Return the upload folder for OPAM files:
e04535c @samoht Add API documentation
samoht authored
240 {i $opam/repo/$repo/upload/opam/$NAME.$VERSION.opam}*)
d72de1d @samoht More cleanups
samoht authored
241 val upload_opam: t -> NV.t -> filename
242
243 (** Return the upload folder for descr files:
e04535c @samoht Add API documentation
samoht authored
244 {i $opam/repo/$repo/upload/descr/$NAME.$VERSION} *)
d72de1d @samoht More cleanups
samoht authored
245 val upload_descr: t -> NV.t -> filename
246
247 (** Return the upload folder for archive files:
e04535c @samoht Add API documentation
samoht authored
248 {i $opam/repo/$repo/upload/archives/$NAME.$VERSION.tar.gz} *)
39771d6 @samoht Init / Update / Upload works
samoht authored
249 val upload_archives: t -> NV.t -> filename
d72de1d @samoht More cleanups
samoht authored
250
093774d @samoht [switch] Store .comp files in OPAM repositories as well
samoht authored
251 (** Compiler files: {i $opam/repo/$repo/compilers/$OVERSION.comp} *)
252 val compiler: t -> OCaml_V.t -> filename
253
254 (** Compiler files: {i $opam/repo/$repo/compilers/} *)
255 val compiler_dir: t -> dirname
256
257 (** All the compiler files *)
258 val compiler_list: t -> OCaml_V.Set.t
259
d72de1d @samoht More cleanups
samoht authored
260 end
Something went wrong with that request. Please try again.