Rename Directory to Directory_tree
[dups.git] / dups.ml
diff --git a/dups.ml b/dups.ml
index 46e8b91..84c0707 100644 (file)
--- a/dups.ml
+++ b/dups.ml
@@ -35,7 +35,7 @@ end = struct
     )
 end
 
     )
 end
 
-module Directory : sig
+module Directory_tree : sig
   val find_files : string -> string Stream.t
 end = struct
   let find_files root =
   val find_files : string -> string Stream.t
 end = struct
   let find_files root =
@@ -78,7 +78,7 @@ let main input =
   let paths =
     match input with
     | Paths_on_stdin -> In_channel.lines stdin
   let paths =
     match input with
     | Paths_on_stdin -> In_channel.lines stdin
-    | Root_path root -> Directory.find_files root
+    | Root_path root -> Directory_tree.find_files root
   in
   let paths_by_digest = Hashtbl.create 1_000_000 in
   let path_count = ref 0 in
   in
   let paths_by_digest = Hashtbl.create 1_000_000 in
   let path_count = ref 0 in
@@ -112,12 +112,14 @@ let main input =
 
 let () =
   let input = ref Paths_on_stdin in
 
 let () =
   let input = ref Paths_on_stdin in
-  Arg.parse [] (fun path ->
-    if Sys.file_exists path then
-      input := Root_path path
-    else begin
-      eprintf "File does not exist: %S\n%!" path;
-      exit 1
-    end
-  ) "";
+  Arg.parse
+    []
+    (function
+    | path when Sys.file_exists path ->
+        input := Root_path path
+    | path ->
+        eprintf "File does not exist: %S\n%!" path;
+        exit 1
+    )
+    "";
   main !input
   main !input
This page took 0.018768 seconds and 4 git commands to generate.