anchor.diff:      if smap_try_find graph key = None then
         (* Util.print1 "key: %s\n" key; *)
         let intf, impl = must (smap_try_find m key) in
  -      let intf_deps =
  +      let intf_deps, mo_roots =
           match intf with
           | Some intf -> collect_one is_user_provided_filename m intf
  -        | None -> []
  +        | None -> [], []
         in
  -      let impl_deps =
  +      let impl_deps, mo'_roots =
           match impl, intf with
  -        | Some impl, Some _ when interface_only -> []
  +        | Some impl, Some _ when interface_only -> [], []
           | Some impl, _ -> collect_one is_user_provided_filename m impl
  -        | None, _-> []
  +        | None, _-> [], []
         in
         let deps = List.unique (impl_deps @ intf_deps) in
         smap_add graph key (deps, White);
  -      List.iter (discover_one false partial_discovery) deps
  +      let to_scan = List.unique (deps @ mo_roots @ mo'_roots) in
  +      List.iter (discover_one false partial_discovery) to_scan
     in
     let discover_command_line_argument f =
       let m = lowercase_module_name f in
  
positive.code:   (verify_mode: verify_mode)
    (is_user_provided_filename: bool)
    (original_map: map)
    (filename: string): list<string>
  =
    let deps = BU.mk_ref [] in
    let add_dep d =
      if not (List.existsML (fun d' -> d' = d) !deps) then
        deps := d :: !deps
    in
    let working_map = smap_copy original_map in
  
    let record_open_module let_open lid =
      let key = lowercase_join_longident lid true in
      match smap_try_find working_map key with
      | Some pair ->
          List.iter (fun f -> add_dep (lowercase_module_name f)) (list_of_pair pair);
          true
      | None ->
        let r = enter_namespace original_map working_map key in
        begin if not r then
          if let_open then
            raise (Errors.Error ("let-open only supported for modules, not namespaces", (range_of_lid lid)))
          else
  
negative.code:   let ast, _ = Driver.parse_file filename in
    collect_module ast;
    (* Util.print2 "Deps for %s: %s\n" filename (String.concat " " (!deps)); *)
    !deps, !mo_roots
  
  let print_graph graph =
    Util.print_endline "A DOT-format graph has been dumped in the current directory as dep.graph";
  