Commit 5fc1b0db authored by Julien Lopez's avatar Julien Lopez
Browse files

decompose_rec added (does not compile)

parent 178030ec
......@@ -2450,6 +2450,17 @@ struct
(decompose_type x)
(decompose_type y)
) (Pair.get bdd) [])) dnf acc
and aux2 acc = function
| (l, (b, t)) :: rest -> aux2 (acc @ [b, l, t]) rest
| _ -> assert false
and aux acc make = function
| (l, _(*???*), b) :: rest -> aux (acc @ [make b (aux2 [] l)]) make rest
| [] -> acc
and decompose_rec any make dnf acc =
decompose_kind any (fun bdd ->
cup (aux [] make (Record.get bdd))) dnf acc
(* ignore(decompose_kind any (fun bdd ->
cup (decompose_dnf (ty any) (aux [] make) (Record.get bdd) [])) dnf acc); [{def=`Type(empty); node=None}]*)
and decompose_type t =
try
DescrHash.find memo t
......@@ -2466,7 +2477,7 @@ struct
@@ decompose_bdd Product.any times (BoolPair.get t.times)
@@ decompose_bdd Product.any_xml xml (BoolPair.get t.xml)
@@ decompose_bdd Arrow.any arrow (BoolPair.get t.arrow)
@@ Record.(if has_absent t then [ty absent] else [])
@@ decompose_rec Record.any record (BoolRec.get t.record) []
in
node_t.def <- (cup descr_t).def; node_t
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