Zulip Chat Archive
Stream: general
Topic: Generating docs locally
Yury G. Kudryashov (Apr 11 2020 at 16:01):
How do I generate api docs locally? I think that docs main page should say "This documentation has been generated by (link to doc gen tool) with mathlib commit 83359d1 and Lean commit e694f49."
Yury G. Kudryashov (Apr 11 2020 at 16:30):
Found doc-gen. I'll PR a change to docs tonight.
Yury G. Kudryashov (Apr 11 2020 at 19:27):
Is there a Lean constant for the filepath to the Lean library?
Yury G. Kudryashov (Apr 11 2020 at 19:29):
I mean ~/.elan/toolchains/leanprover-community-lean-3.8.0/lib/lean/library/
Gabriel Ebner (Apr 11 2020 at 19:31):
open tactic meta def get_path_to_lean_library : tactic string := do env ← get_env, some ol ← pure $ env.decl_olean ``eq, pure $ ol.popn_back 14 #eval get_path_to_lean_library >>= trace
Yury G. Kudryashov (Apr 11 2020 at 19:31):
Thank you!
Gabriel Ebner (Apr 11 2020 at 19:31):
Why do you want to put the path into the documentation?
Yury G. Kudryashov (Apr 11 2020 at 19:34):
I want to migrate it to Python pathlib
Yury G. Kudryashov (Apr 11 2020 at 19:35):
And replace lean/library in filename
with s = filename.relative_to lean_library_path
Yury G. Kudryashov (Apr 11 2020 at 19:36):
BTW, can I convert from tactic string
to io string
?
Yury G. Kudryashov (Apr 11 2020 at 19:38):
Found io.run_tactic
Scott Morrison (Apr 12 2020 at 01:56):
It's a pity we have io.run_tactic
and parser.of_tactic
.
Simon Hudon (Apr 12 2020 at 02:00):
What's the issue with those?
Scott Morrison (Apr 12 2020 at 04:58):
Just that they have different names!
Scott Morrison (Apr 12 2020 at 04:59):
Both should be of_tactic
(or possibly run_tactic
).
Last updated: Dec 20 2023 at 11:08 UTC