mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
13 lines
307 B
OCaml
13 lines
307 B
OCaml
|
|
|
|
let () =
|
|
if Array.length Sys.argv <> 2 then failwith "usage: id_sexp file";
|
|
let f = Sys.argv.(1) in
|
|
let s = CCSexp.L.of_file f in
|
|
match s with
|
|
| `Ok l ->
|
|
List.iter
|
|
(fun s -> Format.printf "@[%a@]@." CCSexp.print s)
|
|
l
|
|
| `Error msg ->
|
|
Format.printf "error: %s@." msg
|