From b4245167cb684432b81f2731cf7bd4adcb1f91c3 Mon Sep 17 00:00:00 2001 From: octachron Date: Mon, 21 Dec 2015 11:39:33 +0100 Subject: [PATCH] Manual: result type constraint warning --- manual/manual/refman/expr.etex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/manual/manual/refman/expr.etex b/manual/manual/refman/expr.etex index 0384b1267..a94d350d1 100644 --- a/manual/manual/refman/expr.etex +++ b/manual/manual/refman/expr.etex @@ -266,6 +266,15 @@ is equivalent to @"fun" parameter_1 "->" \ldots "fun" parameter_n "->" % (expr ":" typexpr )@ \end{center} +Beware of the small syntactic difference between a type constraint on +the last parameter +\begin{center} + @"fun" parameter_1 \ldots (parameter_n":"typexpr)"->" expr @ +\end{center} +and one on the result +\begin{center} + @"fun" parameter_1 \ldots parameter_n":" typexpr "->" expr @ +\end{center} The parameter patterns @"~"lab@ and @"~("lab [":" typ]")"@ are shorthands for respectively @"~"lab":"lab@ and