5 match Sys.argv.(1) with
6 | "-help" | "--help" | "-h" | "--h" ->
8 ("Usage: create_environment <dumpfile> <uri_index>\n" ^
9 " <dumpfile> is the file where environment will be dumped\n" ^
10 " <uri_index> is the file containing the URIs, one per line,\n" ^
11 " that will be typechecked. Could be \"-\" for\n" ^
17 CicEnvironment.set_trust (fun _ -> trust);
18 Helm_registry.set "getter.mode" "remote";
19 Helm_registry.set "getter.url" "http://mowgli.cs.unibo.it:58081/";
21 if Sys.file_exists outfname then begin
22 let ic = open_in outfname in
23 CicEnvironment.restore_from_channel ic;
29 with Invalid_argument _ -> "-"
33 | fname -> open_in fname
38 let uri = input_line ic in
41 let uri = UriManager.uri_of_string uri in
42 ignore (CicTypeChecker.typecheck uri CicUniv.empty_ugraph)
43 (* with Sys.Break -> () *)
45 with End_of_file | Sys.Break ->
46 let oc = open_out outfname in
47 CicEnvironment.dump_to_channel oc;