Commit fdae6d32 by Pietro Abate

[r2004-03-14 14:40:35 by beppe] Empty log message

```Original author: beppe
Date: 2004-03-14 14:40:35+00:00```
parent fcb04ba5
 ... ... @@ -121,11 +121,20 @@ T(\$\$%%t%%\$\$ \$\$|\$\$ \$\$%%u%%\$\$) = T(\$\$%%t%%\$\$) | T(\$\$%%u%%\$\$) T(\$\$%%t%%\$\$ \$\$list\$\$) = [ T(\$\$%%t%%\$\$)* ] T(\$\$A\$\$) = `A T(\$\$A of\$\$ \$\$%%t%%\$\$) = ( `A, T(\$\$%%t%%\$\$) ) | { u : T(\$\$%%t%%\$\$) } if in contravariant (argument) position | { u : T(\$\$%%t%%\$\$) } if in contravariant (argument) position T(\$\${ u :\$\$ \$\$%%t%%\$\$ \$\$}\$\$) = < | {| u : T(\$\$%%t%%\$\$) |} if in covariant (result) position | {| u : T(\$\$%%t%%\$\$) |} if in covariant (result) position ]]>

The translation is straightforward so it deserves few remarks. Just notice that since OCaml records are not extensible then we translate them by strict CDuce records, but when a record type is specified in a contravariant position we use the non strict ones as we want to allow to use a CDuce function that can be fed with a record with lesser fields where an OCaml function for arguments with more fields is expected.
Polymorphic variants, polymorphic types, and abstract types cannot be specified (yet).

... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!