-
Notifications
You must be signed in to change notification settings - Fork 297
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
[Merged by Bors] - chore(*): reduce imports #3235
Conversation
You can always use the new |
@semorrison I understand where you are coming from, but as user I would rather have |
Nothing of course is preventing you using Certainly |
If this makes the life of tactic writers easier then I vote yes, despite the inconvenience of breaking the flow of working on some file when you suddenly need to go up and add a tactic import. |
For this particular use case, you can also add |
I guess |
You need to set it under |
I think this sums up my preferences too. |
Regarding |
This is exactly the use case that *Lean had to recompile |
Then I misunderstood what |
It indeed sounds wonderful! Where can we find documentation about that? |
Nevertheless, there's another reason to shrink the import hierarchy (particularly for |
bors merge |
The RFC pull request simply removes some `import tactic` or `import tactic.basic`, and then makes the necessary changes in later files to import things as needed. I'm not sure if it's useful or not Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Build failed (retrying...): |
The RFC pull request simply removes some `import tactic` or `import tactic.basic`, and then makes the necessary changes in later files to import things as needed. I'm not sure if it's useful or not Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Build failed: |
bors merge |
The RFC pull request simply removes some `import tactic` or `import tactic.basic`, and then makes the necessary changes in later files to import things as needed. I'm not sure if it's useful or not Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
Pull request successfully merged into master. Build succeeded: |
#3333) As discussed on [zulip](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/import.20refactor.20and.20library_search), #3235 had the unfortunate effect of making `library_search` and `#where` and various other things unavailable in many places in mathlib. This PR makes an effort to import `tactic.basic` as early as possible, while otherwise reducing unnecessary imports. 1. import `tactic.basic` "as early as possible" (i.e. in any file that `tactic.basic` doesn't depend on, and which imports any tactic strictly between `tactic.core` and `tactic.basic`, just `import tactic.basic` itself 2. add `tactic.finish`, `tactic.tauto` and `tactic.norm_cast` to tactic.basic (doesn't requires adding any dependencies) 3. delete various unnecessary imports Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
#3333) As discussed on [zulip](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/import.20refactor.20and.20library_search), #3235 had the unfortunate effect of making `library_search` and `#where` and various other things unavailable in many places in mathlib. This PR makes an effort to import `tactic.basic` as early as possible, while otherwise reducing unnecessary imports. 1. import `tactic.basic` "as early as possible" (i.e. in any file that `tactic.basic` doesn't depend on, and which imports any tactic strictly between `tactic.core` and `tactic.basic`, just `import tactic.basic` itself 2. add `tactic.finish`, `tactic.tauto` and `tactic.norm_cast` to tactic.basic (doesn't requires adding any dependencies) 3. delete various unnecessary imports Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
The RFC pull request simply removes some `import tactic` or `import tactic.basic`, and then makes the necessary changes in later files to import things as needed. I'm not sure if it's useful or not Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
…unity#3319) Following on from leanprover-community#3256 and leanprover-community#3235, this slices a little out of `data.fintype.basic`, and reduces imports, mostly in the vicinity of `data.fintype.basic`. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
leanprover-community#3333) As discussed on [zulip](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/import.20refactor.20and.20library_search), leanprover-community#3235 had the unfortunate effect of making `library_search` and `#where` and various other things unavailable in many places in mathlib. This PR makes an effort to import `tactic.basic` as early as possible, while otherwise reducing unnecessary imports. 1. import `tactic.basic` "as early as possible" (i.e. in any file that `tactic.basic` doesn't depend on, and which imports any tactic strictly between `tactic.core` and `tactic.basic`, just `import tactic.basic` itself 2. add `tactic.finish`, `tactic.tauto` and `tactic.norm_cast` to tactic.basic (doesn't requires adding any dependencies) 3. delete various unnecessary imports Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
The RFC pull request simply removes some
import tactic
orimport tactic.basic
, and then makes the necessary changes in later files to import things as needed.I'm not sure if it's useful or not --- the reason I did it was to try to make life a bit easier while working on
tactics/
files, to reduce the recompilation load. On the other hand, maybe people like the simplicity of always havingimport tactic.basic
done as early as possible, even if it is a slight bottleneck in compilation.I have a slight preference to make changes in this direction, but am happy to be overrruled.