Skip to content

Commit a6db21d

Browse files
committed
Update some references to the old stdlib site
1 parent 0ddc5cc commit a6db21d

13 files changed

+44
-48
lines changed

content/bigarray.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tags: [learning]
44

55
# Bigarray
66

7-
[Bigarray](https://caml.inria.fr/pub/docs/manual-ocaml/libref/Bigarray.html)
7+
[Bigarray](https://v2.ocaml.org/api/Bigarray.html)
88
serves as a way to bypass some of the limitations with OCaml's built-in array data structures.
99

1010
For example:

content/command_line.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ tags: [ecosystem]
55

66
# Command Line Arguments
77

8-
* The standard library contains the
9-
[Arg](https://caml.inria.fr/pub/docs/manual-ocaml/libref/Arg.html) module,
8+
* The standard library contains the
9+
[Arg](https://v2.ocaml.org/api/Arg.html) module,
1010
which has a simple syntax for defining command line arguments.
1111
However, it uses mutable state for arguments,
1212
and doesn't have a built-in way to handle things such as sub-arguments,

content/data_struct.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags: [ecosystem]
99
A major part of a standard library's role is providing basic
1010
data structures and algorithms.
1111
All the [standard libraries](standard_libraries.md) provide these:
12-
* The [standard library](https://caml.inria.fr/pub/docs/manual-ocaml/libref/) contains basic data structures:
12+
* The [standard library](https://v2.ocaml.org/api/) contains basic data structures:
1313
List, Array, Immutable Map, Hashtable, Mutable Queue, Mutable Stack.
1414
* [Base](https://github.com/janestreet/base) contains many additional data structures.
1515
* [Containers](https://github.com/c-cube/ocaml-containers) is a data structure-oriented extension of the standard library.

content/ecosystem.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ For testing frameworks in OCaml, see [Testing](testing.md)
154154

155155
## Time and Date
156156
* For short-term timing requirements,
157-
[Sys.time](https://caml.inria.fr/pub/docs/manual-ocaml/libref/Sys.html) can do the job.
157+
[Sys.time](https://v2.ocaml.org/api/Sys.html) can do the job.
158158
* [mtime](https://github.com/dbuenzli/mtime): wall-clock monotonic time,
159159
and the best choice for longer-running timing requirements.
160160
* [ptime](http://erratique.ch/software/ptime): POSIX time.
161-
* [ISO8601](https://github.com/sagotch/ISO8601.ml/)
162-
* [calendar](http://calendar.forge.ocamlcore.org/)
163-
* [odate](https://github.com/hhugo/odate)
161+
* [ISO8601](https://github.com/sagotch/ISO8601.ml/)
162+
* [calendar](http://calendar.forge.ocamlcore.org/)
163+
* [odate](https://github.com/hhugo/odate)
164164
* [Timedesc](https://github.com/daypack-dev/timere): date time handling.
165165
* [Timere](https://github.com/daypack-dev/timere): date time reasoning.
166166
* [Timere-parse](https://github.com/daypack-dev/timere): natural language parsing of date, time and duration.
@@ -174,6 +174,3 @@ For GUIs and TUIs (Terminal User Interfaces), see [User Interface](ui.md)
174174
## Web and Networking
175175
For libraries related to web development and networking,
176176
see [Web and Networking](web_networking.md)
177-
178-
179-

content/faq.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tags: [learning]
1919
then Prints the result.) Many people who use an OCaml toplevel use the
2020
`utop` toplevel. It's more full-featured than the `ocaml` toplevel that
2121
comes with an OCaml compiler. You can also evaluate OCaml expressions in an
22-
editor or IDE, for example. See the
22+
editor or IDE, for example. See the
2323
[Code tools](code_tools.md)
2424
page.
2525

@@ -29,7 +29,7 @@ tags: [learning]
2929
It might be a bad idea to change the syntax of types in a language that puts so much emphasis on
3030
types. (Standard ML uses the same convention. Since it and OCaml both developed from an earlier
3131
ML, it's likely that the convention predates OCaml.)
32-
32+
3333
However, the type syntax kind of makes sense if you think about English syntax: A "passenger
3434
ship" is a ship that carries passengers. An `int list` is a list that contains `int`s.
3535
(You could also write "list of integers" in English, but then you need to add the "of".)
@@ -80,11 +80,11 @@ It's good to know what the 'gotchas' are before you head in, so you can look out
8080
Even if you know what you're doing with your code today, someone will come and modify
8181
it someday and use your polymorphic comparison on a data structure that doesn't support it.
8282

83-
* **Semicolons and `if` statements with `let`**:
83+
* **Semicolons and `if` statements with `let`**:
8484
When a `let` expression begins in the final branch of an `if` expression,
85-
a semicolon will not terminate the `let`; instead the `let` expression will include
85+
a semicolon will not terminate the `let`; instead the `let` expression will include
8686
the code that comes after the semicolon. One might expect that the semicolon ends the
87-
`if` expression, and that the code following it will execute *after* the entire `if`
87+
`if` expression, and that the code following it will execute *after* the entire `if`
8888
expression, but instead that code is part of the `if` expression. This can introduce
8989
subtle bugs, although it is a consequence of the normal (and useful) scoping rule
9090
for `let`. To make the semicolon follow the entire `if` with the embedded `let`, wrap
@@ -102,63 +102,63 @@ the `let` expression in parentheses or `begin`/`end`. For more, see
102102
is not included in
103103
val foo : 'a -> 'a
104104
```
105-
This means that your function (or any other value that gets this type) is not really polymorphic,
105+
This means that your function (or any other value that gets this type) is not really polymorphic,
106106
and the compiler doesn't have enough information to infer its concrete type, thus it represents the unknown
107107
parts of the type with so called "weak type variables", the placeholders the need to be filled in by you.
108-
(The compiler will do it itself, if possible, but when you see the weak type in the error produced by
109-
the compiler, it means that it wasn't possible, and your help is needed).
108+
(The compiler will do it itself, if possible, but when you see the weak type in the error produced by
109+
the compiler, it means that it wasn't possible, and your help is needed).
110110

111111
The [Weak Type Variables](weak_type_variables.md) article describes in detail why they exist in OCaml and
112-
how to cope with them.
112+
how to cope with them.
113113

114114
## Syntax
115115

116116
* **Printf directives**: Where can I find a list of `printf`, `sprintf`,
117-
etc. directives such as `%s`, `%b`, `%d`, `%f`, etc.?
118-
117+
etc. directives such as `%s`, `%b`, `%d`, `%f`, etc.?
118+
119119
See the [Printf
120-
module documentation](http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printf.html)
120+
module documentation](http://v2.ocaml.org/api/Printf.html)
121121
in the OCaml Manual.
122122

123123
* **Infix operators**: Where can I find documentation on standard infix
124124
operators such as `@@`?
125-
125+
126126
For general documentation on operators, see the OCaml manual: [Operators](https://caml.inria.fr/pub/docs/manual-ocaml/expr.html#sec151)
127-
in the Expressions section, [Index of values](http://caml.inria.fr/pub/docs/manual-ocaml/libref/index_values.html), or the
128-
[Stdlib module documentation](http://caml.inria.fr/pub/docs/manual-ocaml/libref/Stdlib.html). For the Stdlib document,
127+
in the Expressions section, [Index of values](http://v2.ocaml.org/api/index_values.html), or the
128+
[Stdlib module documentation](http://v2.ocaml.org/api/Stdlib.html). For the Stdlib document,
129129
you'll want to search the page for "operator" or for the specific operator you're interested in.
130-
130+
131131
For operator precedence and associativity, see the [Expressions](https://caml.inria.fr/pub/docs/manual-ocaml/expr.html)
132-
section of the manual, and scroll down past the BNF syntax specification or search for "Construction or operator". The
132+
section of the manual, and scroll down past the BNF syntax specification or search for "Construction or operator". The
133133
Stdlib module also specifies precedence and associativity in the documentation for each operator.
134-
134+
135135
(Also possibly useful: [Built-in operators and functions](https://www2.lib.uchicago.edu/keith/ocaml-class/operators.html)
136136
at *OCaml for the Skeptical*.)
137137

138138
* **ppx**: What are these `[%% ...]`, `[@@ ...]` expressions that I
139-
see in people's code? What does it mean when there's a percent sign in the
139+
see in people's code? What does it mean when there's a percent sign in the
140140
middle of a name, as in `let%lwt`? What are extension points?
141-
141+
142142
See [A Guide to PreProcessor eXtensions](ppx.md) or [A Tutorial to OCaml -ppx Language Extensions](https://www.victor.darvariu.me/jekyll/update/2018/06/19/ppx-tutorial.html).
143143

144144
* **+'a, -'a**: Why are some type variables prefaced by "+" or "-",
145145
as in `type +'a t`?
146-
146+
147147
These are called "variance annotations". They're used to constrain
148148
subtyping relations. See [+'a and
149149
-'a](https://blog.janestreet.com/a-and-a) at the Jane Street Tech
150150
Blog.
151151

152152
* **open!**: What's the difference between `open My_module` and
153153
`open! My_module`?
154-
154+
155155
Both make the values and types in `My_module` available without having
156156
to write "My_module." in front of them. `open My_module` will trigger
157157
a warning if `My_module` overrides existing definitions. `open!` suppresses
158158
this warning. See [Overriding in open statements](http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec250)
159159
from [Chapter 8 Language extensions](http://caml.inria.fr/pub/docs/manual-ocaml/extn.html) in
160-
the OCaml manual.
161-
160+
the OCaml manual.
161+
162162
At present `open!` also suppresses another warning as well. This is a warning
163163
that no definition in the opened module is in fact used within
164164
`open!`'s scope. There is some disagreement about whether this behavior
@@ -167,4 +167,3 @@ how to cope with them.
167167
a module as a way of providing an alternative standard programming environment.
168168
See the discussion at this OCaml PR: [Fix PR6638: "unused open" warning was incorrectly suppressed
169169
by "open!"](https://github.com/ocaml/ocaml/pull/1110).
170-

content/iterators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Available Options
44

55
* As of 4.07, OCaml has a built-in
6-
[Seq](https://caml.inria.fr/pub/docs/manual-ocaml/libref/Seq.html)
6+
[Seq](https://v2.ocaml.org/api/Seq.html)
77
type, which every Stdlib data structure can convert to and from.
88
Technically, this is a generator.
99
Making use of this type will increase performance when running
@@ -90,7 +90,7 @@ to actually import the `Iter` library for a data structure to use it.
9090
`Streaming.Stream` avoids inner mutable types, but they're essentially hidden from the user at the `Iter` level.
9191
`Streaming.Stream` also has resource cleanup as part of its design,
9292
for example when streaming from a file or socket.
93-
For `Iter`, resource cleanup is not built in, and
93+
For `Iter`, resource cleanup is not built in, and
9494
usage of a `with_resource` function is required for resource cleanup.
9595

9696
## Recommendations

content/learning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ How to program OCaml in the new multicore-OCaml runtime.
115115

116116
### The Format Module
117117

118-
The Stdlib has the [Format](https://caml.inria.fr/pub/docs/manual-ocaml/libref/Format.html)
118+
The Stdlib has the [Format](https://v2.ocaml.org/api/Format.html)
119119
module for pretty printing.
120120
It's a little tricky to get a hang of.
121121
* [Tutorial](https://ocaml.org/learn/tutorials/format.html)

content/pretty_printing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tags: [ecosystem]
55

66
# Pretty Printing
77

8-
* [Format](https://caml.inria.fr/pub/docs/manual-ocaml/libref/Format.html):
8+
* [Format](https://v2.ocaml.org/api/Format.html):
99
stdlib module using the notion of boxes to lay out pretty-printing commands.
1010
It's recommended to use one of the abstractions below instead.
1111
* [CCFormat](https://github.com/c-cube/ocaml-containers/blob/master/src/core/CCFormat.mli):

content/process_management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Process Management and Shell Scripting
22

3-
* The standard library contains the [Unix](https://caml.inria.fr/pub/docs/manual-ocaml/libref/Unix.html) module,
3+
* The standard library contains the [Unix](https://v2.ocaml.org/api/Unix.html) module,
44
which allows for low-level process management.
55
This is fairly brittle due to the fact that it's mostly (but not entirely) tailored towards Unix.
66
* [shexp](https://github.com/janestreet/shexp):
@@ -10,6 +10,6 @@ In fact, this is one of the few libraries that supports piping properly.
1010
* [feather](https://github.com/charlesetc/feather):
1111
Lightweight shell scripting and process management.
1212
[docs](https://github.com/charlesetc/feather/blob/master/README.md).
13-
* [lwt](https://github.com/ocsigen/lwt) has the
13+
* [lwt](https://github.com/ocsigen/lwt) has the
1414
[lwt_process](https://ocsigen.org/lwt/3.2.1/api/Lwt_process) module,
1515
which has cross-platform process manipulation functions.

content/regular_expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ matched groups.
1414
interface for 90% of your regex needs.
1515
This is a binding on top of Re.
1616
* OCaml comes with the
17-
[Str](https://caml.inria.fr/pub/docs/manual-ocaml/libref/Str.html) module.
17+
[Str](https://v2.ocaml.org/api/Str.html) module.
1818
This module is __not__ recommended because it is not part of the standard library,
1919
it uses global states and is not particularly fast, but its availability makes it
2020
useful when you don't have access to anything better.

0 commit comments

Comments
 (0)