Skip to content

Commit

Permalink
Use efficient implementation of concat_map
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Sep 26, 2021
1 parent 8902351 commit 985cb40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion otherlibs/stdune-unstable/list.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let filteri l ~f =
in
filteri l 0

let concat_map l ~f = concat (map l ~f)
let concat_map t ~f = ListLabels.concat_map t ~f

let unordered_concat =
let rec outer acc = function
Expand Down
8 changes: 4 additions & 4 deletions test/blackbox-tests/test-cases/duplicate-c-cxx-obj.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ stubs names, things are still broken if their .o files overlap:

$ dune build --root diff-stanza @all 2>&1 | dune_cmd sanitize
Entering directory 'diff-stanza'
File "dune", line 9, characters 12-15:
9 | (cxx_names foo))
^^^
File "dune", line 4, characters 10-13:
4 | (c_names foo))
^^^
Error: Multiple definitions for the same object file "foo$ext_obj". See another
definition at dune:4.
definition at dune:9.
Hint: You can avoid the name clash by renaming one of the objects, or by
placing it into a different directory.

Expand Down
6 changes: 3 additions & 3 deletions test/blackbox-tests/test-cases/duplicate-c-cxx.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ c_names and cxx_names with overlapping names in the same stanza
c_names with overlapping names in different stanzas
$ dune build --root diff-stanza @all 2>&1 | dune_cmd sanitize
Entering directory 'diff-stanza'
File "dune", line 9, characters 10-13:
9 | (c_names foo))
File "dune", line 4, characters 10-13:
4 | (c_names foo))
^^^
Error: Multiple definitions for the same object file "foo$ext_obj". See another
definition at dune:4.
definition at dune:9.
Hint: You can avoid the name clash by renaming one of the objects, or by
placing it into a different directory.

0 comments on commit 985cb40

Please sign in to comment.