Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
fdae6d32
Commit
fdae6d32
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[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
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/manual/interface.xml
View file @
fdae6d32
...
...
@@ -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
]]>
</sample>
<p>
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.
<br/>
Polymorphic variants, polymorphic types, and abstract types cannot be specified (yet).
</p>
</box>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment