tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.23k stars 85 forks source link

[Doc] Update manual and examples with latest pattern features #1924

Closed yannham closed 4 weeks ago

yannham commented 1 month ago

Closes #1911.

This PR updates the manual to take into account the latest extensions of pattern matching, namely wildcard patterns, constant patterns, array patterns, pattern guards and or-patterns.

Doing so, we also update the examples (in the manual and in the examples directory) to use pattern matching whenever it looks more idiomatic and make the code more readable.

yannham commented 1 month ago

Note that this PR requires to update Topiary to handle all of this new syntax first. Currently the Nickel formatting task of the CI chokes on those new constructs.