Skip to content

Commit 50c6301

Browse files
README.md: REPL: add laziness and strictness (#738)
It is not ideal placement, but because of the current CLI design there is no ideal placement at all, except to place implications of every key in its own headline, which would mean to duplicate most of `--help` in README. #663 already shows that `--help` is not understandable, because currently everything is intermingled. Further rehashing of README is of course possible, but I see no way to lay-out needed info cleanly (there is a lot of if/else cases) without the redesign of the CLI.
1 parent e18d3cc commit 50c6301

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,29 @@ This also binds the evaluated expression result to the `input` variable, so that
213213

214214
Use the `:help` command for a list of all available REPL commands.
215215

216+
## Nix laziness
217+
218+
Nix is a lazy language with the ability of recursion, so by default REPL and eval prints are lazy:
219+
220+
```
221+
hnix \
222+
--eval \
223+
--expr '{ x = true; }'
224+
225+
{ x = "<CYCLE>"; }
226+
```
227+
228+
To disable laziness add the `--strict` to commands or `:set strict` in the REPL.
229+
230+
```
231+
hnix \
232+
--eval \
233+
# Strictly \
234+
--strict \
235+
--expr '{ x = true; }'
236+
237+
{ x = true; }
238+
```
216239

217240
## Contributing
218241

0 commit comments

Comments
 (0)