Struct map is a mechanism to let Go code expose simple structs to Elvish code.
The difference between struct maps and maps is convenience for Go code; they
also have different performance characteristics, but since struct maps are
always quite small, the difference is not meaningful for Elvish's use cases.
As a result, there is no good reason that Elvish code needs to be aware of the
difference between struct maps and normal maps. Making them indistinguishable to
Elvish code simplifies the language.
This commit does the following:
- Change Equal, Hash, Kind and Repr to treat struct maps like maps.
- Change Assoc and Dissoc to "promote" struct maps to maps.
- Remove the custom Repr method of parse.Source.
- Update documentation to reflect this change.
For example, [`put`]() links to the elvdoc for "put".
Also remove the @cf macro now that implicit targets make it easier to link to
other elvdoc sections.
For example, a link to language.html#number is converted to point to
https://elv.sh/ref/language.html#number instead. Such links are quite common in
elvdocs.
Also convert all link destinations that use ./language.html to use language.html
instead, and add a check in tools/check-disallowed.sh to ensure that remains the
case.
The elvdocs still use the old format (#elvdoc:fn or #elvdoc:var) for now, but
will be changed to "fn" and "var" forms soon.
Also remove the accidentally committed cmd/mvelvdoc. It has been used to perform
the conversion automatically but is not supposed to be committed.