Add -v command line switch
[llpp.git] / keystoml.ml
blobe19e679cbbb200776db018e90ad78281d0f11be7
1 open Printf
3 let lines =
4 let lines =
5 match (try Some (open_in Sys.argv.(1)) with _ -> None) with
6 | None -> []
7 | Some ic ->
8 let lines =
9 let rec fold accu =
10 match (try Some (input_line ic) with _ -> None) with
11 | Some line -> fold (line :: accu)
12 | None -> List.rev accu
14 fold []
16 close_in ic;
17 lines
19 lines;
22 let _ =
23 printf "let keys = [\n";
24 List.iter (fun l -> printf " %S;\n" l) lines;
25 printf "];;\n"