anchor.diff:  }
   
   let rec read_chunk () =
  -    let s = the_interactive_state in
  -    let log =
  -      if !Options.debug <> [] then
  -        let transcript = match !s.log with
  -          | Some transcript ->
  -              transcript
  -          | None ->
  -              let transcript = Util.open_file_for_writing "transcript" in
  -              s.log := Some transcript;
  -              transcript
  -        in
  -        fun line ->
  -          Util.append_to_file transcript line;
  -          Util.flush_file transcript
  -      else
  -        fun _ ->
  -          ()
  -    in
  -
  -    let stdin =
  -      match !s.stdin with
  -      | Some i ->
  -          i
  -      | None ->
  -          let i = Util.open_stdin () in
  -          s.stdin := Some i;
  -          i
  -    in
  -    let line = match Util.read_line stdin with
  -        | None -> exit 0
  -        | Some l -> l in
  -    log line;
  -
  -    let l = Util.trim_string line in
  -    if Util.starts_with l "#end"
  -    then begin
  -        let responses = match Util.split l " " with
  -            | [_; ok; fail] -> (ok, fail)
  -            | _ -> ("ok", "fail") in
  -        let str = Util.string_of_string_builder s.chunk in
  -        Util.clear_string_builder s.chunk; Code (str, responses)
  +  let s = the_interactive_state in
  +  let log =
  +    if !Options.debug <> [] then
  +      let transcript =
  +        match !s.log with
  +        | Some transcript -> transcript
  +        | None ->
  +            let transcript = Util.open_file_for_writing "transcript" in
  +            s.log := Some transcript;
  +            transcript
  +      in
  +      fun line ->
  +        Util.append_to_file transcript line;
  +        Util.flush_file transcript
  +    else
  +      fun _ -> ()
  +  in
  +  let stdin =
  +    match !s.stdin with
  +    | Some i -> i
  +    | None ->
  +        let i = Util.open_stdin () in
  +        s.stdin := Some i;
  +        i
  +  in
  +  let line =
  +    match Util.read_line stdin with
  +    | None -> exit 0
  +    | Some l -> l
  +  in
  +  log line;
  +
  +  let l = Util.trim_string line in
  +  if Util.starts_with l "#end" then begin
  +    let responses =
  +      match Util.split l " " with
  +      | [_; ok; fail] -> (ok, fail)
  +      | _ -> ("ok", "fail") in
  +    let str = Util.string_of_string_builder s.chunk in
  +    Util.clear_string_builder s.chunk; Code (str, responses)
       end
  -    else if Util.starts_with l "#pop"
  -    then (Util.clear_string_builder s.chunk; Pop l)
  -    else if Util.starts_with l "#push"
  -    then (Util.clear_string_builder s.chunk; Push l)
  -    else if l = "#finish"
  -    then exit 0
  -    else (Util.string_builder_append s.chunk line;
  -          Util.string_builder_append s.chunk "\n";
  -          read_chunk())
  +  else if Util.starts_with l "#pop" then (Util.clear_string_builder s.chunk; Pop l)
  +  else if Util.starts_with l "#push" then (Util.clear_string_builder s.chunk; Push l)
  +  else if l = "#finish" then exit 0
  +  else
  +    (Util.string_builder_append s.chunk line;
  +    Util.string_builder_append s.chunk "\n";
  +    read_chunk())
   
   let shift_chunk () =
     let s = the_interactive_state in
     match !s.buffer with
  -  | [] ->
  -      read_chunk ()
  +  | [] -> read_chunk ()
     | chunk :: chunks ->
         s.buffer := chunks;
         chunk
  
positive.code: (*
     Copyright 2008-2014 Nikhil Swamy and Microsoft Research
  
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
  
negative.code:           let _, all_filenames = Parser.Dep.collect [ filename ] in
            List.rev (List.tl all_filenames)
  
  (* Main function *)
  let go _ =
    let res, filenames = process_args () in
    match res with
      | Help ->
          Options.display_usage (Options.specs())
      | Die msg ->
          Util.print_string msg
      | GoOn ->
          if !Options.dep <> None then Parser.Dep.print (Parser.Dep.collect filenames)
          else if !Options.universes then
            (test_universes filenames |> ignore;
            report_universes_errors None)
          (* Normal mode of operations *)
          else if !Options.interactive then
            let filenames =
              if !Options.explicit_deps then begin
                if List.length filenames = 0 then
                  Util.print_error "--explicit_deps was provided without a file list!\n";
                  filenames
                end
              else begin
                if List.length filenames > 0 then
                  Util.print_warning "ignoring the file list (no --explicit_deps)\n";
                  detect_dependencies_with_first_interactive_chunk ()
                end
            in
            let fmods, dsenv, env = batch_mode_tc filenames in
            interactive_mode dsenv env
          else if List.length filenames >= 1 then
            (let fmods, dsenv, env = batch_mode_tc filenames in
            report_errors None;
            codegen fmods env;
            finished_message fmods)
          else
            Util.print_error "no file provided\n"
  
  let main () =
    try
      go ();
      cleanup ();
      exit 0
    with | e ->
      if Util.handleable e then Util.handle_err false () e;
      if !Options.trace_error then
        Util.print2_error "Unexpected error\n%s\n%s\n" (Util.message_of_exn e) (Util.trace_of_exn e)
      else if not (Util.handleable e) then
        Util.print1_error "Unexpected error; please file a bug report, ideally with a minimized version of the source program that triggered the error.\n%s\n" (Util.message_of_exn e);
        cleanup ();
        exit 1
  