Commit 7ca084de authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-03-13 22:09:41 by beppe] typos

Original author: beppe
Date: 2004-03-13 22:09:41+00:00
parent 204b7cff
......@@ -85,17 +85,20 @@ Note that there are two rules to respect when creating your interface file:
What <i>compatible</i> means? We have defined a canonical translation
<code>T()</code> from OCaml types to CDuce types (see next frame). The
OCaml type declared for a CDuce expression in a <code>.mli</code> is
compatible with the CDuce type of the expression if the latter is is a
compatible with the CDuce type of the expression if the latter is a
subtype of the canonical translation of the former.
</p>
<p>
For instance, the previous example respects this rule since the
canonical translation of <code>int</code> is <code>ML_int</code> that
is a subtype of <code>Int</code>. Therefore the canonical translation
of <code>int -> int</code> which is <code>ML_int -> ML_int</code> is a
supertype of <code>Int -> ML_int</code>). Instead the canonical
translation of <code>int -> int</code> is not a supertype of <code>Int -> Int</code>, so if we had used this type in the definition of the CDuce function
it would be rejected by the compiler.
canonical translation of <code>int</code> is <code>ML_int</code>
that is a subtype of <code>Int</code>. Therefore the type <code>int
-> int</code> whose canonical translation is <code>ML_int ->
ML_int</code>, is <i>compatible</i> with the CDuce type of
<code>f : Int -> ML_int</code>. Instead, since
the canonical translation of <code>int -> int</code> is not a
supertype of <code>Int -> Int</code>, then if we had used this type
in the definition of the CDuce function it would be rejected by the
compiler.
</p>
</box>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment