/
skeleton.ml
33 lines (27 loc) · 884 Bytes
/
skeleton.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(* Step one: load the cmts, turn them to lambda *)
(* Now we just load them, merging later *)
(* a little clean could make it simpler *)
let lambdas =
Arguments.iterate
(fun ( name, tree) ->
Translmod.transl_implementation name
( tree, Typedtree.Tcoerce_none)
)
let () =
if lambdas = [| |]
then print_endline "You must specify at least one cmt file"
else
begin
(* Step two: merge the lambda code
- removing the "global" primitive
- putting all functions on top of everything
*)
let lambda = Unglobalize.unglobalize lambdas in
(* for debugging purpose, this shall not stay here in final code *)
if Arguments.print ()
then Printlambda.lambda Format.std_formatter lambda;
if Arguments.comp ()
then Compilelambda.comp lambda;
(* Step three: analysis *)
(* (* Step four: compile ? *) *)
end