tweag / nickel

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

modular-configurations.md: to_lower -> lowercase #1857

Closed Jasha10 closed 3 months ago

Jasha10 commented 4 months ago

I tried running the example from the "Toward modules" section of doc/manual/modular-configurations.md, and I got the following error message:

error: missing field `to_lower`
     ┌─ /home/homestar/tmp/machines.ncl:14:18
     │
  14 │       computed = std.string.to_lower inputs.foo,
     │                  ^^^^^^^^^^^^^^^^^^^ this requires the field `to_lower` to exist
     │
     ┌─ <stdlib/std.ncl>:2295:12
     │
2295 │     string = {
     │ ╭────────────'
2296 │ │     BoolLiteral
2297 │ │       | doc m%"
2298 │ │         Contract for a string representation of a boolean, namely `true` or
     · │
2872 │ │       = fun s => %enum_from_str% s,
2873 │ │   },
     │ ╰───' this record lacks the field `to_lower`

Looking at nickel's standard library docs, I concluded that std.string.to_lower should probably be replaced with std.string.lowercase.

vkleen commented 3 months ago

I've taken the liberty of doing the backport myself.