|
@@ -16863,22 +16863,22 @@ The abstract syntax of \LangAny{} is defined in Figure~\ref{fig:Rany-syntax}.
|
|
Figure~\ref{fig:Rany-concrete-syntax}.)} The $\INJECT{e}{T}$ form
|
|
Figure~\ref{fig:Rany-concrete-syntax}.)} The $\INJECT{e}{T}$ form
|
|
converts the value produced by expression $e$ of type $T$ into a
|
|
converts the value produced by expression $e$ of type $T$ into a
|
|
tagged value. The $\PROJECT{e}{T}$ form converts the tagged value
|
|
tagged value. The $\PROJECT{e}{T}$ form converts the tagged value
|
|
-produced by expression $e$ into a value of type $T$ or else halts the
|
|
|
|
-program if the type tag is not equivalent to $T$.
|
|
|
|
|
|
+produced by expression $e$ into a value of type $T$ or halts the
|
|
|
|
+program if the type tag does not match $T$.
|
|
%
|
|
%
|
|
Note that in both \code{Inject} and \code{Project}, the type $T$ is
|
|
Note that in both \code{Inject} and \code{Project}, the type $T$ is
|
|
restricted to a flat type $\FType$, which simplifies the
|
|
restricted to a flat type $\FType$, which simplifies the
|
|
-implementation and corresponds with what is needed for compiling \LangDyn{}.
|
|
|
|
|
|
+implementation and corresponds with the needs for compiling \LangDyn{}.
|
|
|
|
|
|
-The \code{any-vector} operators adapt the vector operations so that
|
|
|
|
-they can be applied to a value of type \code{Any}. They also
|
|
|
|
-generalize the vector operations in that the index is not restricted
|
|
|
|
|
|
+The \code{any-...} operators adapt the \racket{vector}\python{tuple} operations so that
|
|
|
|
+they can be applied to a value of type \racket{\code{Any}}\python{\code{AnyType()}}. They also
|
|
|
|
+generalize the \racket{vector}\python{tuple} operations in that the index is not restricted
|
|
to be a literal integer in the grammar but is allowed to be any
|
|
to be a literal integer in the grammar but is allowed to be any
|
|
expression.
|
|
expression.
|
|
|
|
|
|
-The type predicates such as \key{boolean?} expect their argument to
|
|
|
|
-produce a tagged value; they return \key{\#t} if the tag corresponds
|
|
|
|
-to the predicate and they return \key{\#f} otherwise.
|
|
|
|
|
|
+The type predicates such as \racket{\key{boolean?}}\python{\key{IsBool()}} expect their argument to
|
|
|
|
+produce a tagged value; they return {\TRUE} if the tag corresponds
|
|
|
|
+to the predicate and they return {\FALSE} otherwise.
|
|
|
|
|
|
The type checker for \LangAny{} is shown in
|
|
The type checker for \LangAny{} is shown in
|
|
Figures~\ref{fig:type-check-Rany-part-1} and
|
|
Figures~\ref{fig:type-check-Rany-part-1} and
|