mathlib icon indicating copy to clipboard operation
mathlib copied to clipboard

Probably `setup_tactic_parser` can be integrated to use `open_locale` instead

Open khoek opened this issue 6 years ago • 4 comments

khoek avatar Sep 20 '19 14:09 khoek

There are two (fixable) issues:

  • setup_tactic_parser opens namespaces, which open_locale currently cannot do. This is easily fixed.
  • It would require a bunch more tactic files to import tactic.localized (or move the contents of tactic.localized to tactic.core).

I can do this, if you think this is desirable.

fpvandoorn avatar Sep 23 '19 18:09 fpvandoorn

How big is tactic.localized and how much does it depend on? This is a feature I would really love to have access to everywhere.

setup_tactic_parser opens namespaces, which open_locale currently cannot do. This is easily fixed.

I don't know how I feel about this. On one hand, setup_tactic_parser clearly overlaps with open_locale but on the other hand, what other use case do we have for open_locale opening namespaces?

cipher1024 avatar Sep 23 '19 19:09 cipher1024

It's like 50 lines, excluding the header of the file. It depends on the function emit_code_here, but nothing else.

I could see some use cases for open_locale opening namespaces. For example, open_locale real might define some nice local notations and open the namespace real.

The disadvantage is that open_locale and open are then not orthogonal anymore, which might cause confusion.

fpvandoorn avatar Sep 23 '19 20:09 fpvandoorn

On the other hand, could we say that open_locale always opens the namespace of the name of the locale? We could add an option to inhibit that behavior but we could understand open_locale as taking notations from a namespace. What do you think?

cipher1024 avatar Sep 25 '19 05:09 cipher1024