Commit 006c2c78 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-06-25 14:23:58 by afrisch] Fix variant

Original author: afrisch
Date: 2004-06-25 14:23:58+00:00
parent ee834806
......@@ -549,9 +549,13 @@ let ocaml2cduce_variant ( name, list ) =
let args, list = List.fold_left f ( [], [] ) list in
let atom = Code.Ml_ident ( "\"" ^ name ^ "\"" ) in
let atom = Code.Ml_abstraction ( Code.Ml_ident "mk_atom", [ atom ] ) in
let func = Code.Ml_ident "Value.sequence" in
let list = Code.Ml_list ( atom :: list ) in
Code.Ml_constr ( name, args ), Code.Ml_abstraction ( func, [ list ] )
match list with
| [] ->
Code.Ml_constr ( name, args ), atom
| list ->
let func = Code.Ml_ident "Value.sequence" in
let list = Code.Ml_list ( atom :: list ) in
Code.Ml_constr ( name, args ), Code.Ml_abstraction ( func, [ list ] )
let rec ocaml2cduce_node flag node = match node.n_kind, node.n_decl with
| ML_module, ML_modsign list ->
......
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