anchor.diff:            raise (Err (BU.format1 "Expected an implementation of module %s, but couldn't find one" key))
           | Some f -> f
   
  -let dependences_of (file_system_map:files_for_module_name) (deps:dependence_graph) (fn:file_name) : list<file_name> =
  +let dependences_of (file_system_map:files_for_module_name)
  +                   (deps:dependence_graph)
  +                   (all_cmd_line_files:list<file_name>)
  +                   (fn:file_name)
  +    : list<file_name> =
       match deps_try_find deps fn with
       | None -> empty_dependences
       | Some (deps, _) ->
  -      List.map (file_of_dep file_system_map) deps
  +      List.map (file_of_dep file_system_map all_cmd_line_files) deps
   
   let add_dependence (deps:dependence_graph)
                      (from:file_name) (to_:file_name)
  
positive.code:         | White ->
              (* Unvisited. Compute. *)
              deps_add_dep dep_graph filename (direct_deps, Gray);
              List.iter (fun k -> aux (k :: cycle) k) (dependences_of file_system_map dep_graph filename);
              (* Mutate the graph (it now remembers transitive dependencies). *)
              deps_add_dep dep_graph filename (direct_deps, Black);
              (* Also build the topological sort (Tarjan's algorithm). *)
              topologically_sorted := filename :: !topologically_sorted
        in
        aux [] filename;
        !topologically_sorted
    in
    //only verify those files on the command line
    filenames |>
    List.iter (fun f ->
      let m = lowercase_module_name f in
      Options.add_verify_module m);
  
    topological_dependences_of (Option.get (List.last filenames)),
    Mk (dep_graph, file_system_map)
  
  
  (** Print the dependencies as returned by [collect] in a Makefile-compatible
      format. *)
  let print_make (Mk (deps, file_system_map)) : unit =
      let keys = deps_keys deps in
      keys |> List.iter
          (fun f ->
            let f_deps, _ = deps_try_find deps f |> Option.get in
            let files = List.map (file_of_dep file_system_map) f_deps in
            let files = List.map (fun s -> replace_chars s ' ' "\\ ") files in
            Util.print2 "%s: %s\n" f (String.concat " " files))
  
  
negative.code: type dependence_graph = //maps file names to the modules it depends on
       | Deps of smap<(dependences * color)>
  type deps =
       | Mk of dependence_graph      //dependences of the entire project, not just those reachable from the command line
             * files_for_module_name //an abstraction of the file system
             * list<file_name>       //all command-line files
  let deps_try_find (Deps m) k = BU.smap_try_find m k
  let deps_add_dep (Deps m) k v = BU.smap_add m k v
  let deps_keys (Deps m) = BU.smap_keys m
  let deps_empty () = Deps (BU.smap_create 41)
  
  let module_name_of_dep = function
      | UseInterface m
      | PreferInterface m
      | UseImplementation m -> m
  
  