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
85011edc
Commit
85011edc
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2003-07-31 21:46:13 by cvscast] Remove optional fields from samples
Original author: cvscast Date: 2003-07-31 21:46:14+00:00
parent
39db6729
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/xtrans.cd
View file @
85011edc
...
...
@@ -22,5 +22,10 @@ let fun f (x : [ T ]) : [ S ] =
let x = f [
<a>
[
<b>
[]
<b>
[] ] ];;
(*fun (x : Xhtml) : [Xhtml] = xtransform [x] with
<h1>
s -> [ ];;*)
(*let x : Xhtml =
<html>
[
<head>
[
<object>
[
<p>
[
<a>
[
<map
id=
""
>
[] ] ] ]
<title>
[] ]
<body>
[] ]
*)
types/sample.ml
View file @
85011edc
...
...
@@ -19,7 +19,9 @@ let rec get memo t =
let
rec
fields
=
function
|
(
true
,_
)
->
absent
|
(
false
,
t
)
->
cons
t
in
let
record
(
r
,
some
,
none
)
=
Types
.
record'
(
not
none
,
LabelMap
.
map
fields
r
)
in
let
record
(
r
,
some
,
none
)
=
let
r
=
LabelMap
.
filter
(
fun
l
(
o
,
t
)
->
not
o
)
r
in
Types
.
record'
(
not
none
,
LabelMap
.
map
fields
r
)
in
let
typ
u
=
let
u
=
Types
.
cap
t
u
in
if
Types
.
is_empty
u
then
raise
Not_found
else
u
in
...
...
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