1. camlspotter
  2. mutated_ocaml

Commits

j...@vmware  committed 25a8e52

Top None is ok

  • Participants
  • Parent commits 5db26dd
  • Branches default

Comments (0)

Files changed (1)

File ocamlspot/ocamlspot.ml

View file
         let top = 
 	  match List.find_map_opt (function Top v -> Some v | _ -> None) file with
 	  | Some (Some top) -> top
-	  | Some None | None -> failwith "no top structure found"
+	  | Some None -> [] (* Error before writing any top element *)
+	  | None -> failwith "no top structure found"
         in
         let argv =
 	  match List.find_map_opt (function Argv v -> Some v | _ -> None) file with