* Version bump: 1.0.0 -> 1.1.0
* Add release notes for 1.1
* Bump version - part 2, reset to 0.1 for new crates
* Add missing README to nickel-lang-cli
* Update Cargo.lock, make nickel-wasm-repl's version consistent
* Update releasing instructions for new crate layout
* Fix typo in RELEASES.md
* Update Cargo.lock
Currently `import` is treated as a very special function that only
accepts literal string as its first argument. It has following
downsides:
* Special handling of `import` is hidden. User can assume that its
just a function while it's a special keyword. User might expect to
be able to pass variables to it while it is only handled before
typechecking and evaluation.
* We can't extend `import` functionality without introducing new
keywords which is not backward-compatible.
This change makes `import` into another statement like `let` or `fun`,
which means it cannot be confused with a function anymore. It also means
that expressions like `import "foo.ncl" bar` and
`import "foo.ncl" & {..}` are invalid, and `import` statement need to be
put in parethesis: `(import "foo.ncl") bar`.
For more context, see discussion in
https://github.com/tweag/nickel/issues/329#issuecomment-1531333491
* Change enum token start from backtick to single-quote
* Get tests to pass
* Fix printing in Term::shallow_repr
* Fix benchmark enum tag syntax
* Change enum tags in the documentation to the new syntax
* Introduce std namespace
This commits put the different modules of the stdlib, previously living
directly at the top-leve in the initial environment (`array`, `string`,
etc.) under the `std` top-level record. This makes the stdlib more
structured, give an unified entry point (including for completion and
querying) and avoid polluting the environment with name that could clash
with e.g. local function parameters.
This changes came with a number of trade-offs. The LSP isn't happy if
something like `std` isn't defined in one location, so we have to write
or at least generated actual code for `std` (instead of programmatically
building the record, for example).
We also want the users to be able to read this file, even if generated,
because otherwise diagnosing a contract error would be quite hard.
There were also other subtleties with respect to typechecking mutually
recursive modules. In the end, the stdlib is currently squashed into one
file (plus the module internals, but which is special) `std.ncl`, which
content is bound to `std` in the initial environment.
* Update the LSP to work with new std namespace
* Update examples to use the new std namespace
* Update benches to use std namespace
* Update integration tests for the new std namespace
* Update snapshot tests for new std namespace
* Last fixes for test after std namespace change
* Please the clippy God 🙏
* Update RELEASES.md - std namespace + RFC005
* Apply suggestions from code review
Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io>
* Update stdlib/std.ncl
Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io>
* Update stdlib/std.ncl
Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io>
* Fix the LSP completion for `std`
* Please the Clippy overlord
---------
Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io>