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
32a80d70
Commit
32a80d70
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2004-03-11 13:33:19 by jdemouth] Ajout de l'option -I a l'interface.
Original author: jdemouth Date: 2004-03-11 13:33:19+00:00
parent
2c941081
Changes
1
Hide whitespace changes
Inline
Side-by-side
driver/cduce.ml
View file @
32a80d70
...
...
@@ -281,17 +281,24 @@ let topinput = run Parser.top_phrases
ifdef
ML_INTERFACE
then
let
check_ml
cu
id
out_dir
out
=
try
let
name
=
cu
^
".cmi"
in
let
file
=
List
.
find
(
fun
dir
->
Sys
.
file_exists
(
Filename
.
concat
dir
name
)
)
!
Librarian
.
obj_path
in
if
file
=
""
then
raise
Not_found
;
let
file
=
Filename
.
concat
file
name
in
(* Load Caml .cmi file. *)
let
ml_cu
=
ML
.
CompUnit
.
from_bytecode
(
cu
^
".cmi"
)
let
ml_cu
=
ML
.
CompUnit
.
from_bytecode
file
cu
and
cd_cu
=
Ml_cduce
.
CompUnit
.
from_types_cu
cu
id
in
(* Check file interfaces. *)
Ml_checker
.
run
ml_cu
cd_cu
;
(* Generate interface file. *)
String
.
set
cu
0
(
Char
.
lowercase
(
String
.
get
cu
0
)
);
let
out
=
open_out
(
Filename
.
concat
out_dir
(
cu
^
".ml"
)
)
in
let
fmt
=
Format
.
formatter_of_out_channel
out
in
Ml_generator
.
ML
.
generate
fmt
ml_cu
cd_cu
;
close_out
out
;
with
_
->
with
Not_found
->
Format
.
eprintf
"Warning: no valid Caml interface found.@."
else
let
check_ml
cu
id
out_dir
out
=
()
;;
...
...
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