1
1
mirror of https://github.com/tweag/nickel.git synced 2024-10-03 22:57:11 +03:00
nickel/notes
Jeremy Schlatter 090984d0e2
clean up outdated primitive operator names (#1992)
* clean up outdated primitive operator names

PR #1937 recently renamed many primitive operators. It missed some
instances of the previous names, though. In particular:

- error messages
- comments
- an unused function "apply_contract" in core/src/term/mod.rs

While most of these names were only made obsolete in #1937, some of them
have been incorrect for longer, eg "%array_access%" in
core/src/term/pattern/compile.rs and "recordMap" in core/src/term/mod.rs.

I caught as many as I could find. However it's hard to be sure I got all
of them, given that some of the previous names are very general terms
like "value", "fields", "length", and "map".

The full list of renames I identifiend are as follows, formatted as
"<old name> <new name>".

First, the easy cases:

    chng_pol label/flip_polarity
    record_map record/map
    str_trim string/trim
    str_chars string/chars
    str_uppercase string/uppercase
    str_lowercase string/lowercase
    str_length string/length
    str_from to_string
    num_from number/from_string
    enum_from enum/from_string
    str_is_match string/is_match
    str_find string/find
    str_find_all string/find_all
    record_empty_with_tail record/empty_with_tail
    label_push_diag label/push_diag
    enum_unwrap_variant enum/unwrap_variant
    enum_is_variant enum/is_variant
    enum_get_tag enum/get_tag
    apply_contract contract/apply
    array_lazy_app_ctr contract/array_lazy_app
    record_lazy_app_ctr contract/record_lazy_app
    elem_at array/at
    str_split string/split
    str_contains string/contains
    record_insert record/insert
    record_insert_with_opts record/insert_with_opts
    record_remove record/remove
    record_remove_with_opts record/remove_with_opts
    label_with_message label/with_message
    label_with_notes label/with_notes
    label_append_note label/append_note
    str_replace string/replace
    str_replace_regex string/replace_regex
    str_substr string/substr
    record_seal_tail record/seal_tail
    record_unseal_tail record/unseal_tail
    array_slice array/slice

Then the harder cases:

    polarity label/polarity
    go_dom label/go_dom
    go_codom label/go_codom
    go_array label/go_array
    go_dict label/go_dict
    embed enum/embed
    map array/map
    generate array/generate
    length array/length
    fields record/fields
    fields_with_opts record/fields_with_opts
    values record/values
    go_field label/go_field
    has_field record/has_field
    has_field_with_opts record/has_field_with_opts
    field_is_defined record/field_is_defined
    field_is_defined_with_opts record/field_is_defined_with_opts
    lookup_type_variable label/lookup_type_variable
    insert_type_variable label/insert_type_variable

Finally, two cases that I didn't understand and seem to be unused:

    rec_force_op op rec_force
    rec_default_op op rec_default

* address code review comments
2024-07-10 09:04:42 +00:00
..
error-reporting-lib-choice.md Save the review of the error reporting libs 2020-07-16 17:27:42 +02:00
fixing-sealing-and-recursive-records.md clean up outdated primitive operator names (#1992) 2024-07-10 09:04:42 +00:00
intersection-and-union-types.md Fixes typos 2023-02-02 11:20:09 +01:00
lossless-ast-parsing.md lossless note: fixes 2022-05-11 12:50:30 +02:00
lsp-semantics.md Update lsp notes (#1660) 2023-10-02 14:29:20 +00:00
partial-parsing.md Add notes on partial parsing (#1434) 2023-07-07 15:49:56 +00:00
standardization-meeting-07.12.21.md Use long names for string and numbers 2023-03-08 16:36:13 +01:00
sum-as-dependent-records.md Use long names for string and numbers 2023-03-08 16:36:13 +01:00
trees-that-grow-proc-macro.md Trees that grow notes (#1419) 2023-07-24 20:12:41 +00:00
typechecking.md Use long names for string and numbers 2023-03-08 16:36:13 +01:00