diff --git a/Dockerfile b/Dockerfile
index 519fea2de..f48ca68ca 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
FROM ocaml/opam:debian-10-ocaml-4.10
-RUN git -C /home/opam/opam-repository pull origin master && git -C /home/opam/opam-repository checkout 1003e5965fbc38d98b88570ac280b519fdae302f && opam update -u -y
+RUN git -C /home/opam/opam-repository pull origin master && git -C /home/opam/opam-repository checkout 3606210eb2472a23e8ef7960ce143026e43e507d && opam update -u -y
WORKDIR /home/opam/src
RUN sudo chown opam /home/opam/src
COPY --chown=opam *.opam /home/opam/src
diff --git a/Dockerfile.deploy b/Dockerfile.deploy
index 0d3ca0dd1..ea7954736 100644
--- a/Dockerfile.deploy
+++ b/Dockerfile.deploy
@@ -1,5 +1,5 @@
FROM ocaml/opam:debian-10-ocaml-4.10 as build
-RUN git -C /home/opam/opam-repository pull origin master && git -C /home/opam/opam-repository checkout 1003e5965fbc38d98b88570ac280b519fdae302f && opam update -u -y
+RUN git -C /home/opam/opam-repository pull origin master && git -C /home/opam/opam-repository checkout 3606210eb2472a23e8ef7960ce143026e43e507d && opam update -u -y
WORKDIR /home/opam/src
RUN sudo chown opam /home/opam/src
COPY --chown=opam *.opam /home/opam/src
diff --git a/Dockerfile.staging b/Dockerfile.staging
index 8c972fc43..43cafb028 100644
--- a/Dockerfile.staging
+++ b/Dockerfile.staging
@@ -1,5 +1,5 @@
FROM ocaml/opam:debian-10-ocaml-4.10 as build
-RUN git -C /home/opam/opam-repository pull origin master && git -C /home/opam/opam-repository checkout 1003e5965fbc38d98b88570ac280b519fdae302f && opam update -u -y
+RUN git -C /home/opam/opam-repository pull origin master && git -C /home/opam/opam-repository checkout 3606210eb2472a23e8ef7960ce143026e43e507d && opam update -u -y
WORKDIR /home/opam/src
RUN sudo chown opam /home/opam/src
COPY --chown=opam *.opam /home/opam/src
diff --git a/Makefile.common b/Makefile.common
index 5b928ca45..0dfd3d7f0 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -39,7 +39,7 @@ template/%_code_snippet.html:template/%_code_snippet.md $(OMD_PP)
cat "$<" | $(OMD_PP) | ${OMD} -o $@
opam_update_list: script/generate_opam_update_list
- curl -O http://opam.ocaml.org/json/last10_updates.json
+ curl -O https://opam.ocaml.org/json/last10_updates.json
script/generate_opam_update_list
script/generate_opam_update_list: script/generate_opam_update_list.ml
diff --git a/site/docs/cheat_sheets.md b/site/docs/cheat_sheets.md
index 83f6e0a85..4221abf1d 100644
--- a/site/docs/cheat_sheets.md
+++ b/site/docs/cheat_sheets.md
@@ -5,16 +5,16 @@
[OCamlPro](http://www.ocamlpro.com/) has published cheat sheets (one or
two-page summaries) on OCaml:
-* [The OCaml Language](http://www.ocamlpro.com/wp-content/uploads/2019/09/ocaml-lang.pdf) (PDF, September 2019)
+* [The OCaml Language](https://ocamlpro.github.io/ocaml-cheat-sheets/ocaml-lang.pdf) (PDF, September 2019)
General overview of the OCaml language: basic data types, basic
concepts, functions, modules, etc.
-* [OCaml Standard Tools](http://www.ocamlpro.com/files/ocaml-tools.pdf) (PDF, June 2011)
+* [OCaml Standard Tools](https://ocamlpro.github.io/ocaml-cheat-sheets/ocaml-tools.pdf) (PDF, June 2011)
Overview of OCaml compilers and their options, tools for lexing and
parsing, Makefile rules, etc.
-* [OCaml Standard Library](http://www.ocamlpro.com/wp-content/uploads/2019/09/ocaml-stdlib.pdf) (PDF, September 2019)
+* [OCaml Standard Library](https://ocamlpro.github.io/ocaml-cheat-sheets/ocaml-stdlib.pdf) (PDF, September 2019)
Overview of the standard library's most common modules.
-* [OCaml Emacs Mode (Tuareg)](http://www.ocamlpro.com/files/tuareg-mode.pdf) (PDF, June 2011)
+* [OCaml Emacs Mode (Tuareg)](https://ocamlpro.github.io/ocaml-cheat-sheets/tuareg-mode.pdf) (PDF, June 2011)
Overview of the Emacs Tuareg mode keyboard shortcuts.
diff --git a/site/index.fr.md b/site/index.fr.md
index fb0dce19b..675000bb0 100644
--- a/site/index.fr.md
+++ b/site/index.fr.md
@@ -55,7 +55,7 @@
Le gestionnaire de paquets OPAM vous donne accès aux multiples versions de
- centaines de paquets.
+ milliers de paquets.
@@ -103,7 +103,7 @@
-
+
-
-
February 24, 2021
+ October 1, 2021
diff --git a/site/learn/tutorials/functional_programming.zh.md b/site/learn/tutorials/functional_programming.zh.md
index 6ff8f1a14..b1ba3ae9a 100644
--- a/site/learn/tutorials/functional_programming.zh.md
+++ b/site/learn/tutorials/functional_programming.zh.md
@@ -10,32 +10,31 @@
到现在我们已经讲了很多了,但还没有真正涉及到**函数式编程**。
目前所讲的所有特性 - 丰富的数据类型(rich data types),
-模式匹配(pattern matching), 类型推导(type inference),
-嵌套函数(nested functions) -
-可以想象它们都可以在一种”超级C“语言中存在。这些特性当然很酷,它们使得代码简洁易读,减少bug,但是它们实际和函数式编程没什么关系。实际上我的
-观点是函数式编程语言的妙处*不是*在于函数式编程,而是因为在我们长年习惯于类C语言编程的时候,编程技术已经提高很多了。因此当我们一次又一次地写`struct { int type; union { ... } }`的时候,ML和Haskell程序员却有着很多安全的变量和数据类型的模式匹配。当我们小心翼翼地
-`free`所有的`malloc`时候,很多语言在上世纪八十年代就有了超越手工管理的内存垃圾收集器。
+模式匹配(pattern matching), 类型推导(type inference),嵌套函数(nested functions) -
+可以想象它们都可以在一种“超级C”语言中存在。这些特性当然很酷,可以让代码跟家简洁、易读、并具有更少的bug,
+但是实际上这与函数式编程的关系不大。实际上函数式编程语言的妙处*不是*在于函数式编程,而是因为在我们多年来使用类C语言编程的时间里,
+编程的前沿技术已经得到了极大地发展。因此当我们一次又一次地写`struct { int type; union { ... } }`的时候,
+ML和Haskell程序员却有着很多安全的可变类型(Safe Variants)和数据类型的模式匹配(Pattern Matching)。当我们小心翼翼地
+`free`所有的`malloc`时候,很多语言在上世纪八十年代就有了超越手工管理内存的垃圾收集器。
好了,现在是时候告诉你们什么是函数式编程了。
-基本的但不是很能说明问题的定义是在**函数式语言中**,
-**函数(functions)**是一等公民。
+最基本的定义是:**函数(functions)**在**函数式语言中**是一等公民。
-听上去不是很有用,让我们来看个例子。
+听上去比较抽象,让我们来看一个实际的例子。
```ocamltop
let double x = x * 2 in
List.map double [ 1; 2; 3 ]
```
-在这个例子中,我首先定义了一个嵌套函数`double`,它读入一个参数`x`后返回`x * 2`。然后`map`在给定的列表(`[1; 2; 3]`)的每个元素上调用`double`来生成结果:一个每个数都扩大一倍的新的列表。
+在这个例子中,我首先定义了一个嵌套函数`double`,它读入一个参数`x`后返回`x * 2`。然后`map`会对给定的列表(`[1; 2; 3]`)中的每个元素都调用`double`来生成结果:一个每个元素的值都翻倍的新的列表。
`map`被称为**高阶函数(higher-order function)**
-(HOF)。高阶函数是指一个把其他函数作为参数之一的函数。
+(HOF)。高阶函数是指接受函数作为参数的函数。
-到现在为止还算简单。如果你对C/C++熟悉的,这就象传递一个函数指针作为参数。Java中有匿名类(anonymous
-class)就像一个低速的闭包(closure)。如果你知道Perl那么你可能已经知道和使用了Perl中的闭包和Perl的`map`函数,这和我们现在所说的完全相同。事实上Perl很大程度上也是一个函数式语言。
+如果你对C/C++熟悉的话,可以把高阶函数想象为一个接受函数指针作为参数的函数。
-**闭包**是那些带着它们被定义时的环境的函数。特别的,一个闭包可以引用它定义时存在的变量。让我们把上面那个函数变得更通用一些,以便我们可以对任何整数列表乘以一个任意值`n`:
+**闭包(Closure)** 是指那些带有它们被定义时的“环境”的函数。特别的,一个闭包可以引用它定义时存在的变量。让我们把上面那个函数变得更通用一些,以便我们可以对任何整数列表乘以一个任意值`n`:
```ocamltop
let multiply n list =
@@ -52,7 +51,7 @@ multiply 5 [1; 2; 3];;
```
关于`multiply`函数有一点值得注意的是嵌套函数`f`.
-这是一个闭包。我们注意一下`f`怎样使用变量`n`的值,我们并没有把`n`作为显式的参数传递给它。`f`是从它的环境中找到它的。`n`是传递给函数`multiply`的参数,所以在这个函数中都是有效的。
+这是一个闭包。我们注意一下`f`怎样使用变量`n`的值,我们并没有把`n`作为显式的参数传递给它。`f`是从它的“环境”中找到它的。`n`是传递给函数`multiply`的参数,所以在这个函数中都是有效的。
这可能听上去很简单,但让我们更进一步的仔细观察下那个对map的调用`List.map f list`.
@@ -82,7 +81,7 @@ end
现在来看`receiver_fn`的定义。这个函数是一个闭包,因为它含有一个引用,
这个引用指向它的环境中的`chan`。
-## 偏函数应用(Partial function applications)和 currying(科里化)
+## 偏函数应用(Partial function applications)
让我们定义一个加法函数用来相加两个整数。
@@ -145,11 +144,7 @@ let plus 2 b = (* 这不是真正的OCaml代码! *)
plus 2 3 : int
```
-这个过程叫做**currying(科里化)** (或者应该叫 **uncurrying(去科里化)**,
-我一直搞不清这两个定义).这个名字来源与Haskell Curry的与lambda
-calculus有关的重要发现。为了避免进入OCaml背后的数学世界而使这个教程变得过于繁琐,我将不会再进一步地说明这个主题。如果感兴趣,你可以从[用
-Google](http://www.google.com/search?q=currying "http://www.google.com/search?q=currying")
-(译注:国内的小伙伴们可能要自行百度了)来获得更多关于currying的信息。
+这个过程叫做**偏函数的应用(Partial Application)**
还记得开始时候我们的`double`和`multiply`函数吗? `multiply`是这样定义的:
@@ -195,7 +190,7 @@ let plus = ( + );;
plus 2 3;;
```
-这里是更多的一些有趣的curring:
+更多关于偏函数应用的例子:
```ocamltop
List.map (plus 2) [1; 2; 3];;
@@ -242,12 +237,12 @@ for (i = 0; i < strlen (s); ++i)
现在流行的做法是由顶至下地计划程序,但是作者的意见是这往往会让整个项目崩盘
(译注人话:计划赶不上变化,怎么做评估都没用)。
-## 非懒惰和懒惰
+## 严格求值(Strictness)和惰性求值(Laziness)
-C类和ML类的语言都是非懒惰的(饥饿求值),而Haskell和Miranda都是懒惰的。OCaml是缺省非懒惰,
-但是在需要的时候支持懒惰的风格。
+类C和ML系的语言都是严格求值的,而Haskell和Miranda都是非严格求值的,或者说是惰性的。虽然OCaml默认是严格求值的,
+但需要时也可使用惰性求值风格进行编程。
-对于一个非懒惰的语言,参数和函数总是在使用前被求值,然后再传入到函数中。比如
+对于一个严格求值的语言,参数和函数总是在使用前被求值,然后再传给函数。比如
下面的代码会引起除零错误:
```ocamltop
@@ -255,16 +250,14 @@ let give_me_a_three _ = 3;;
give_me_a_three (1/0);;
```
-如果你用一些传统的语言编程,这就是这么回事,但是你可能会为事情还可以
-以另一个方式发生而惊讶。
+如果使用一些传统的语言编程,可能以上代码会如描述的那样产生错误。但如果使用惰性求值的方式运行这段代码,结果则可能会出人意表。
-在懒惰语言中,一些奇怪的事情会发生。函数的参数只有在被使用的时候才会被求值。
-`give_me_a_three`没有使用参数而直接返回3,因而在一个懒惰语言中,这个函数调用
-不会失败,因为这个参数根本没有被求值!因此,也不会引起除零错误。
+在惰性求值的语言中,因为函数的参数只有在被使用的时候才会被求值,所以会有一些不一样的事情发生。
+比如,因为其第一个参数不会被求值,函数`give_me_a_three`会直接返回`3`。因此,除零错误根本不会发生。
-懒惰语言允许你定义无限长的链表,只要你不会真的要遍历整个链表(比方说你只要前10个元素)。
+惰性求值的语言允许你定义无限长的链表,只要你不会真的要遍历整个链表(比方说你只要前10个元素)。
-OCaml是一个非懒惰的语言,但是`Lazy`模块允许你写懒惰的表达式,下面就是这样一个例子:
+虽然OCaml是一个严格求值的语言,但是`Lazy`模块允许你写惰性求值的表达式,下面是一个示例:
```ocamltop
let lazy_expr = lazy (1/0)
@@ -272,13 +265,13 @@ let lazy_expr = lazy (1/0)
注意到其类型是 `int lazy_t`。
-因为`give_me_a_three`的输入是任何类型,所以我们也可以把这个懒惰表达式传入:
+因为`give_me_a_three`的输入可以是任何类型,所以我们也可以把惰性求值的表达式传进去:
```ocamltop
give_me_a_three lazy_expr
```
-如果要求值,我们要用`Lazy.force`函数:
+如果要求值,我们需要使用`Lazy.force`函数:
```ocamltop
Lazy.force lazy_expr
diff --git a/site/releases/4.12.1.md b/site/releases/4.12.1.md
index 45701ad79..017ba262f 100644
--- a/site/releases/4.12.1.md
+++ b/site/releases/4.12.1.md
@@ -34,7 +34,7 @@ opam switch create 4.12.1+flambda+nnpchecker --package=ocaml-variants.4.12.1+opt
or with opam 2.1:
```
-opam switch create 4.12.1+flambda -ocaml-variants.4.12.1+options ocaml-option-flambda
+opam switch create 4.12.1+flambda+nnpchecker ocaml-variants.4.12.1+options ocaml-option-flambda ocaml-option-nnpchecker
```
diff --git a/site/releases/4.13.0.md b/site/releases/4.13.0.md
index 1de78f19a..184b2b031 100644
--- a/site/releases/4.13.0.md
+++ b/site/releases/4.13.0.md
@@ -51,7 +51,7 @@ opam switch create 4.13.0+flambda+nnpchecker --package=ocaml-variants.4.13.0+opt
or with opam 2.1:
```
-opam switch create 4.13.0+flambda -ocaml-variants.4.13.0+options ocaml-option-flambda
+opam switch create 4.13.0+flambda+nnpchecker ocaml-variants.4.13.0+options ocaml-option-flambda ocaml-option-nnpchecker
```
diff --git a/site/releases/4.13.1.md b/site/releases/4.13.1.md
new file mode 100644
index 000000000..bf50f77ed
--- /dev/null
+++ b/site/releases/4.13.1.md
@@ -0,0 +1,60 @@
+
+
+# OCaml 4.13.1
+
+This page describes OCaml **4.13.1**, released on Oct 1, 2021.
+This is a bug-fix release of [OCaml 4.13.0](4.13.0.html).
+
+
+
+Configuration options
+---------------------
+
+The configuration of the installed opam switch can be tuned with the
+following options:
+
+- ocaml-option-32bit: set OCaml to be compiled in 32-bit mode for 64-bit Linux and OS X hosts
+- ocaml-option-afl: set OCaml to be compiled with afl-fuzz instrumentation
+- ocaml-option-bytecode-only: compile OCaml without the native-code compiler
+- ocaml-option-default-unsafe-string: set OCaml to be compiled without safe strings by default
+- ocaml-option-flambda: set OCaml to be compiled with flambda activated
+- ocaml-option-fp: set OCaml to be compiled with frame-pointers enabled
+- ocaml-option-musl: set OCaml to be compiled with musl-gcc
+- ocaml-option-nnp : set OCaml to be compiled with --disable-naked-pointers
+- ocaml-option-nnpchecker: set OCaml to be compiled with --enable-naked-pointers-checker
+- ocaml-option-no-flat-float-array: set OCaml to be compiled with --disable-flat-float-array
+- ocaml-option-static :set OCaml to be compiled with musl-gcc -static
+
+For instance, one can install a switch with both `flambda` and the naked-pointer checker enabled with
+
+```
+opam switch create 4.13.1+flambda+nnpchecker --package=ocaml-variants.4.13.1+options,ocaml-option-flambda,ocaml-option-nnpchecker
+```
+
+or with opam 2.1:
+
+```
+opam switch create 4.13.1+flambda+nnpchecker ocaml-variants.4.13.1+options ocaml-option-flambda ocaml-option-nnpchecker
+```
+
+
+![](../img/source.gif "") Source distribution
+---------------------------------------------
+
+- [Source
+ tarball](https://github.com/ocaml/ocaml/archive/4.13.1.tar.gz)
+ (.tar.gz) for compilation under Unix (including Linux and macOS)
+ and Microsoft Windows (including Cygwin).
+- Also available in
+ [.zip](https://github.com/ocaml/ocaml/archive/4.13.1.zip)
+ format.
+- The official development repo is hosted on
+ [GitHub](https://github.com/ocaml/ocaml).
+
+Changes
+-------
+
+### Regression fix
+
+- [#10661](https://github.com/ocaml/ocaml/issues/10661), [#10662](https://github.com/ocaml/ocaml/issues/10662): fix a bug with classes named "row"
+ (Gabriel Scherer, report by Nicolás Ojeda Bär)
diff --git a/site/releases/4.13/notes/Changes b/site/releases/4.13/notes/Changes
index cf020c898..deb5c5344 100644
--- a/site/releases/4.13/notes/Changes
+++ b/site/releases/4.13/notes/Changes
@@ -1,3 +1,12 @@
+OCaml 4.13.1 (01 October 2021)
+--------------------------------
+
+### Bug fixes
+
+- #10661, #10662: fix a bug with classes named "row"
+ (Gabriel Scherer, report by Nicolás Ojeda Bär)
+
+
OCaml 4.13.0 (24 September 2021)
--------------------------------
diff --git a/site/releases/index.fr.md b/site/releases/index.fr.md
index 5f2f23d60..06527b398 100644
--- a/site/releases/index.fr.md
+++ b/site/releases/index.fr.md
@@ -10,6 +10,7 @@ instructions pour installer OCaml par d'autres moyens que la
compilation des sources, comme par exemple le gestionnaire de paquets
OPAM et les gestionnaire de paquets spécifiques à une plateforme.
+* OCaml [4.13.1](4.13.1.html), [téléchargé](https://github.com/ocaml/ocaml/archive/4.13.1.tar.gz), publiée le 1er octobre, 2021.
* OCaml [4.13.0](4.13.0.html), [téléchargé](https://github.com/ocaml/ocaml/archive/4.13.0.tar.gz), publiée le 24 septembre 2021.
* OCaml [4.12.1](4.12.1.html), [téléchargé](https://github.com/ocaml/ocaml/archive/4.12.1.tar.gz), publiée le 24 septembre 2021.
* OCaml [4.12.0](4.12.0.html), [téléchargé](https://github.com/ocaml/ocaml/archive/4.12.0.tar.gz), publiée le 24 février 2021.
diff --git a/site/releases/index.md b/site/releases/index.md
index 780adc1ad..8e0ebdcb7 100644
--- a/site/releases/index.md
+++ b/site/releases/index.md
@@ -9,6 +9,7 @@ See also the [install](/docs/install.html) page for instructions on
installing OCaml by other means, such as the OPAM package manager and
platform specific package managers.
+* OCaml [4.13.1](4.13.1.html), [Download](https://github.com/ocaml/ocaml/archive/4.13.1.tar.gz), released Oct 1, 2021.
* OCaml [4.13.0](4.13.0.html), [Download](https://github.com/ocaml/ocaml/archive/4.13.0.tar.gz), released Sep 24, 2021.
* OCaml [4.12.1](4.12.1.html), [Download](https://github.com/ocaml/ocaml/archive/4.12.1.tar.gz), released Sep 24, 2021.
* OCaml [4.12.0](4.12.0.html), [Download](https://github.com/ocaml/ocaml/archive/4.12.0.tar.gz), released Feb 24, 2021.