jj/docs
Yuya Nishihara a7bff04af8 revset, templater: implement arity-based alias overloading
Still alias function shadows builtin function (of any arity) by name. This
allows to detect argument error as such, but might be a bit inconvenient if
user wants to overload heads() for example. If needed, maybe we can add some
config/revset syntax to import builtin function to alias namespace.

The functions table is keyed by name, not by (name, arity) pair. That's mainly
because std collections require keys to be Borrow, and a pair of borrowed
values is incompatible with owned pair. Another reason is it makes easy to look
up overloads by name.

Alias overloading could also be achieved by adding default parameters, but that
will complicate the implementation a bit more, and can't prevent shadowing of
0-ary immutable_heads().

Closes #2966
2024-06-14 23:11:29 +09:00
..
design docs: ask MkDocs to fail on links to non-existent sections 2024-05-14 13:14:27 -07:00
technical docs: update description of conflicts to be about tree-level conflicts 2023-11-30 14:24:48 -08:00
branches.md jj git push docs: document safety checks 2024-06-01 11:19:48 -07:00
cli-reference.md docs CLI reference: explain that argument help is truncated 2024-05-15 09:45:40 -07:00
code-of-conduct.md docs: s/socio-economics/socioeconomics/ per codespell suggestion 2024-05-24 11:34:03 +09:00
config.md docs: update windows docs to mention minus, update minus docs 2024-06-10 11:47:34 -07:00
config.toml docs: document git.fetch and git.push config options 2024-02-09 12:03:42 -06:00
conflicts.md politics: delete references to Pijul 2024-04-14 13:16:08 -07:00
contributing.md require poetry 1.8, recommend installing it via pipx 2024-05-27 10:53:35 -07:00
FAQ.md docs: add FAQ for why to use new-then-amend over edit 2024-03-14 11:32:53 -07:00
filesets.md docs: sort list of operators in order of binding strengths 2024-06-07 11:27:37 +09:00
git-comparison.md rebase: add --insert-after and --insert-before options for --revisions 2024-04-29 14:19:09 +08:00
git-compatibility.md docs: fix converting a repo into a co-located one 2024-05-20 21:39:27 +09:00
github.md docs: ask MkDocs to fail on links to non-existent sections 2024-05-14 13:14:27 -07:00
glossary.md docs: fix another missing shell quoting around root() 2024-06-04 21:19:16 +09:00
index.md docs index.md: explain that the website sidebar may be hidden 2023-10-04 05:25:37 -07:00
install-and-setup.md docs install_and_setup: move Arch Linux after From Source 2024-06-09 10:15:16 -07:00
operation-log.md op_walk: add support for op_id+ (children) operator 2024-01-02 10:30:08 +09:00
related-work.md politics: delete references to Pijul 2024-04-14 13:16:08 -07:00
revsets.md revset, templater: implement arity-based alias overloading 2024-06-14 23:11:29 +09:00
sapling-comparison.md mkdocs: make MkDocs work with more GitHub-like list formatting 2023-11-03 19:15:37 -07:00
templates.md revset, templater: implement arity-based alias overloading 2024-06-14 23:11:29 +09:00
testimonials.md docs: Add a Testmonials page. 2024-02-25 14:20:33 +01:00
tutorial.md tutorial: edits to the diff editor explanation 2024-05-05 18:17:38 -07:00
windows.md docs: update windows docs to mention minus, update minus docs 2024-06-10 11:47:34 -07:00
working-copy.md docs: say that we support $GIT_DIR/info/exclude 2024-03-08 09:59:10 -08:00