Source

ocaml-indent / tests / if_chain.ml

Full commit
let () =
  if magic_number = cmo_magic_number then begin
    let cu_pos = input_binary_int ic in
    seek_in ic cu_pos;
    let cu = (input_value ic : compilation_unit) in
    Some (`CMO cu)
  end 
  else if magic_number = cma_magic_number then begin
    let toc_pos = input_binary_int ic in
    seek_in ic toc_pos;
    let toc = (input_value ic : library) in
    Some (`CMA toc)
  end
  else if magic_number = cmi_magic_number then begin
    let cmi = Cmi_format.input_cmi ic in
    Some (`CMI cmi)
  end else if magic_number = cmx_magic_number then begin
    let ui = (input_value ic : unit_infos) in
    Some (`CMX ui)
  end