Enum type syntax has been changed temporarily since the unified syntax
change. While we bikeshed on a new syntax, we don't want people to rely
on the temporary syntax. This PR hides enum types from stdlib types, and
document enum tags but not enum types in the manual. That way, they are
still morally used in the stdlib, but a random user should be able to
use it without knowing about the type.
This commit removes the original idiosyncratic operators -$ and $[ ] for
field remove and field insertion, and replace them with standad
%record_remove% and %record_insert%. Also adds corresponding wrapper in
the record stdlib, as well as an update fonction, that is the
composition of the two (removal then insertion).
revert back to original comments syntax `//` will be implemented in a next PR
TODO: tests are passing but check if everything has realy been updated correctly
The implementation of builtin contracts is pure Nickel code written as
part of the `contract.ncl` module. However it pollutes the user environment
with identifiers like `list`, `record`, etc. This PR prefixes those
contract implementation with a `$`, which makes them inaccessible from user code
directly, as an identifier can't start with `$`, to avoid unfortunate
clashes.
In #518, I had forgotten to change the names of the primitives in
`stdlib/strings.ncl`. I noticed the omission because this was breaking
the example in the nickel-lang.org playground.
This renames all builtins and standard library functions to conform to
a snake case convention, as per decision recorded in #493. This also
adapts examples and tests to this change. All functions have been
renamed the way you'd expect, except the following:
* `fromPred` -> `from_predicate`
* `typeOf` -> `typeof` (like in C)
* `fieldsOf` -> `fields` (the `_of` is redundant for a function)
* `valuesOf` -> `values` (the `_of` is redundant for a function)
Closes#493