Commit 85011edc authored by Pietro Abate's avatar 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
......@@ -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>[] ]
*)
......@@ -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
......
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