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
651713ca
Commit
651713ca
authored
Jul 10, 2007
by
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
b689503a
Changes
1
Hide whitespace changes
Inline
Side-by-side
cdo2cmo/ml_generator.ml
View file @
651713ca
...
...
@@ -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
->
...
...
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