open Nock_lib let rec show noun depth limit = if depth = 0 || limit = 0 then "..." else match noun with | Noun.Atom z -> Z.to_string z | Noun.Cell (h, t) -> Printf.sprintf "[%s %s]" (show h (depth-1) (limit-1)) (show t (depth-1) (limit-1)) let () = if Array.length Sys.argv < 2 then exit 1; let path = Sys.argv.(1) in let ic = open_in_bin path in let len = in_channel_length ic in let data = really_input_string ic len in close_in ic; let noun = Serial.cue (Bytes.of_string data) in Printf.printf "structure=%s\n" (show noun 6 100)