home
/
code
/
dups.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidy-up variant label names
[dups.git]
/
dups.ml
diff --git
a/dups.ml
b/dups.ml
index
b6782b6
..
67a4fd3
100644
(file)
--- a/
dups.ml
+++ b/
dups.ml
@@
-78,17
+78,17
@@
end = struct
end
type input =
end
type input =
- |
Root_paths of string list
- |
Paths_on_stdin
+ |
Stdin
+ |
Directories of string list
type output =
| Stdout
| Directory of string
let make_input_stream = function
type output =
| Stdout
| Directory of string
let make_input_stream = function
- |
Paths_on_s
tdin ->
+ |
S
tdin ->
In_channel.lines stdin
In_channel.lines stdin
- |
Root_path
s paths ->
+ |
Directorie
s paths ->
let paths = StrSet.elements (StrSet.of_list paths) in
Stream.concat (List.map paths ~f:Directory_tree.find_files)
let paths = StrSet.elements (StrSet.of_list paths) in
Stream.concat (List.map paths ~f:Directory_tree.find_files)
@@
-134,7
+134,7
@@
let main input output =
eprintf "Processed %d files in %f seconds.\n%!" !path_count (t1 -. t0)
let () =
eprintf "Processed %d files in %f seconds.\n%!" !path_count (t1 -. t0)
let () =
- let input = ref
Paths_on_s
tdin in
+ let input = ref
S
tdin in
let output = ref Stdout in
let assert_file_exists path =
if Sys.file_exists path then
let output = ref Stdout in
let assert_file_exists path =
if Sys.file_exists path then
@@
-169,10
+169,10
@@
let () =
assert_file_exists path;
assert_file_is_dir path;
match !input with
assert_file_exists path;
assert_file_is_dir path;
match !input with
- |
Paths_on_s
tdin ->
- input :=
Root_path
s [path]
- |
Root_path
s paths ->
- input :=
Root_path
s (path :: paths)
+ |
S
tdin ->
+ input :=
Directorie
s [path]
+ |
Directorie
s paths ->
+ input :=
Directorie
s (path :: paths)
)
"";
main !input !output
)
"";
main !input !output
This page took
0.026228 seconds
and
4
git commands to generate.