aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/extraction/g_extraction.ml4
diff options
context:
space:
mode:
authorGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2017-07-04 23:15:38 +0200
committerGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2017-07-05 11:43:19 +0200
commit21327e39ef6c6e04569bf8f138d242819139964d (patch)
treed80cbeadd29f9284aac3258f028806c3e4831c83 /plugins/extraction/g_extraction.ml4
parent38a749767b74c1fc67d02948efd13ea8c5cbcd0b (diff)
Extraction TestCompile foo : a new command for extraction + ocamlc
Extraction TestCompile foo is equivalent to: Extraction "/tmp/testextraction1234.ml" foo ocamlfind ocamlc -I /tmp -c /tmp/testextraction1234.mli /tmp/testextraction1234.ml This command isn't meant for the end user, but rather as an helper for test-suite scripts. It only works with extraction to OCaml, and the generated code should be standalone.
Diffstat (limited to 'plugins/extraction/g_extraction.ml4')
-rw-r--r--plugins/extraction/g_extraction.ml44
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/extraction/g_extraction.ml4 b/plugins/extraction/g_extraction.ml4
index 2fa453e53..f4b110253 100644
--- a/plugins/extraction/g_extraction.ml4
+++ b/plugins/extraction/g_extraction.ml4
@@ -66,6 +66,10 @@ VERNAC COMMAND EXTEND Extraction CLASSIFIED AS QUERY
(* Monolithic extraction to a file *)
| [ "Extraction" string(f) ne_global_list(l) ]
-> [ full_extraction (Some f) l ]
+
+(* Extraction to a temporary file and OCaml compilation *)
+| [ "Extraction" "TestCompile" ne_global_list(l) ]
+ -> [ extract_and_compile l ]
END
VERNAC COMMAND EXTEND SeparateExtraction CLASSIFIED AS QUERY