Skip to content

Commit ef135a7

Browse files
authored
MPR7546, manual: preambles and warnings for compiler-libs modules (ocaml#2020)
* preambles for compiler-libs modules * Compilerlibs intro and warning link
1 parent 9c79a08 commit ef135a7

39 files changed

+381
-131
lines changed

Changes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ Working version
245245

246246
### Manual and documentation:
247247

248+
- MPR#7546, GPR#2020: preambles and introduction for compiler-libs.
249+
(Florian Angeletti, review by Daniel Bünzli, Perry E. Metzger
250+
and Gabriel Scherer)
251+
248252
- MPR#7825: html manual split compilerlibs from stdlib in the html
249253
index of modules
250254
(Florian Angeletti, review by Perry E. Metzger and Gabriel Scherer)

bytecomp/simplif.mli

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
(* *)
1414
(**************************************************************************)
1515

16-
(** Lambda simplification and lambda plugin hooks *)
16+
(** Lambda simplification and lambda plugin hooks
17+
18+
{b Warning:} this module is unstable and part of
19+
{{!Compiler-libs}compiler-libs}.
20+
21+
*)
1722

1823
(* Elimination of useless Llet(Alias) bindings.
1924
Transformation of let-bound references into variables.

driver/pparse.mli

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
(* *)
1414
(**************************************************************************)
1515

16-
(** Driver for the parser, external preprocessors and ast plugin hooks *)
16+
(** Driver for the parser, external preprocessors and ast plugin hooks
17+
18+
{b Warning:} this module is unstable and part of
19+
{{!Compiler-libs}compiler-libs}.
20+
21+
*)
1722

1823
open Format
1924

manual/manual/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,22 @@ htmlman/libref/style.css: style.css $(STDLIB_MLIS)
5757
$(STDLIB_MLIS)
5858
cp style.css $@
5959

60+
COMPILERLIBS_MODULES=$(shell echo $(basename $(notdir $(COMPILERLIBS_MLIS))) \
61+
| sed "s/\<./\U&/g")
6062

61-
htmlman/compilerlibref/style.css: style.css $(COMPILERLIBS_MLIS)
63+
library/compiler-libs.txt: library/compiler-libs.mld
64+
cp $< $@ && echo "{!modules:$(COMPILERLIBS_MODULES)}" >> $@
65+
66+
67+
htmlman/compilerlibref/style.css: library/compiler-libs.txt style.css \
68+
$(COMPILERLIBS_MLIS)
6269
mkdir -p htmlman/compilerlibref
6370
$(OCAMLDOC) -colorize-code -sort -html \
6471
-d htmlman/compilerlibref \
6572
-I $(SRC)/stdlib \
6673
$(DOC_COMPILERLIBS_INCLUDES) \
74+
-intro library/compiler-libs.txt \
75+
library/compiler-libs.txt \
6776
$(COMPILERLIBS_MLIS)
6877
cp style.css $@
6978

@@ -153,6 +162,7 @@ clean:
153162
$(MAKE) -C refman clean
154163
$(MAKE) -C tutorials clean
155164
-rm -f texstuff/*
156-
cd htmlman; rm -rf libref index.html manual*.html *.haux *.hind *.svg
165+
cd htmlman; rm -rf libref compilerlibref index.html \
166+
manual*.html *.haux *.hind *.svg
157167
cd textman; rm -f manual.txt *.haux *.hind
158168
cd infoman; rm -f ocaml.info ocaml.info-* *.haux *.hind

manual/manual/library/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
arithstatus.mli
44
ocamldoc.out
55
ocamldoc.sty
6+
compiler-libs.txt
7+

manual/manual/library/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ ocamldoc.out: $(DOC_ALL_MLIS)
7474
.PHONY: clean
7575
clean:
7676
rm -f *.tex ocamldoc.out ocamldoc.sty
77+
rm -f compiler-libs.txt
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{!indexlist}
2+
3+
{1 Warning}
4+
This library is part of the internal OCaml compiler API, and is
5+
not the language standard library.
6+
There are no compatibility guarantees between releases, so code written
7+
against these modules must be willing to depend on specific OCaml compiler
8+
versions.
9+

ocamldoc/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,18 @@ stdlib_man/Stdlib.3o: $(OCAMLDOC) $(DOC_ALL_MLIS)
399399
$(OCAMLDOC_RUN) -man -d stdlib_man -nostdlib \
400400
-hide Stdlib -lib Stdlib $(DOC_ALL_INCLUDES) \
401401
-pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk" \
402-
-t "OCaml library" -man-mini $(DOC_ALL_MLIS)
402+
-t "OCaml library" -man-mini \
403+
-text $(SRC)/manual/manual/library/compiler-libs.mld \
404+
$(DOC_ALL_MLIS)
403405

404406
stdlib_html/Stdlib.html: $(OCAMLDOC) $(DOC_ALL_MLIS)
405407
$(MKDIR) stdlib_html
406408
$(OCAMLDOC_RUN) -html -d stdlib_html -nostdlib \
407409
-hide Stdlib -lib Stdlib $(DOC_ALL_INCLUDES) \
408410
-pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk" \
409-
-t "OCaml library" $(DOC_ALL_MLIS)
411+
-t "OCaml library" \
412+
-text $(SRC)/manual/manual/library/compiler-libs.mld \
413+
$(DOC_ALL_MLIS)
410414

411415
.PHONY: autotest_stdlib
412416
autotest_stdlib:

parsing/ast_helper.mli

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
(* *)
1414
(**************************************************************************)
1515

16-
(** Helpers to produce Parsetree fragments *)
16+
(** Helpers to produce Parsetree fragments
17+
18+
{b Warning} This module is unstable and part of
19+
{{!Compiler-libs}compiler-libs}.
20+
21+
*)
1722

1823
open Asttypes
1924
open Docstrings

parsing/ast_invariants.mli

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
(* *)
1313
(**************************************************************************)
1414

15-
(** Check AST invariants *)
15+
(** Check AST invariants
16+
17+
{b Warning:} this module is unstable and part of
18+
{{!Compiler-libs}compiler-libs}.
19+
20+
*)
1621

1722
val structure : Parsetree.structure -> unit
1823
val signature : Parsetree.signature -> unit

0 commit comments

Comments
 (0)