Manual: result type constraint warning

master
octachron 2015-12-21 11:39:33 +01:00
parent c007c77b70
commit b4245167cb
1 changed files with 9 additions and 0 deletions

View File

@ -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