Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(data/list/defs): remove chunking hack #6441

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/data/list/defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ meta def to_chunks {α} (n : ℕ) : list α → list (list α)
/--
Asynchronous version of `list.map`.
-/
meta def map_async_chunked {α β} (f : α → β) (xs : list α) (chunk_size := 1024) : list β :=
((xs.to_chunks chunk_size).map (λ xs, task.delay (λ _, list.map f xs))).bind task.get
meta def map_async {α β} (f : α → β) (xs : list α) : list β :=
(xs.map (λ x, task.delay (λ _, f x))).map task.get

end list
2 changes: 1 addition & 1 deletion src/tactic/lint/frontend.lean
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ checks.mmap $ λ ⟨linter_name, linter⟩, do
let test_decls := if linter.auto_decls then all_decls else non_auto_decls,
test_decls ← test_decls.mfilter (λ decl, should_be_linted linter_name decl.to_name),
s ← read,
let results := test_decls.map_async_chunked $ λ decl, prod.mk decl.to_name $
let results := test_decls.map_async $ λ decl, prod.mk decl.to_name $
match linter.test decl s with
| result.success w _ := w
| result.exception msg _ _ :=
Expand Down