1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 19:01:16 +02:00
nix/tests/functional/repl/doc-functor.expected
2025-01-24 18:53:42 +01:00

101 lines
2.7 KiB
Text

Nix <nix version>
Type :? for help.
nix-repl> :l doc-functor.nix
Added <number omitted> variables.
nix-repl> :doc multiplier
Function `__functor`\
… defined at /path/to/tests/functional/repl/doc-functor.nix:12:23
Multiply the argument by the factor stored in the factor attribute.
nix-repl> :doc doubler
Function `multiply`\
… defined at /path/to/tests/functional/repl/doc-functor.nix:5:17
Look, it's just like a function!
nix-repl> :doc recursive
Function `__functor`\
… defined at /path/to/tests/functional/repl/doc-functor.nix:82:23
This looks bad, but the docs are ok because of the eta expansion.
nix-repl> :doc recursive2
error:
… while partially calling '__functor' to retrieve documentation
… while calling '__functor'
at /path/to/tests/functional/repl/doc-functor.nix:90:17:
89| */
90| __functor = self: self.__functor self;
| ^
91| };
… from call site
at /path/to/tests/functional/repl/doc-functor.nix:90:23:
89| */
90| __functor = self: self.__functor self;
| ^
91| };
(19999 duplicate frames omitted)
error: stack overflow; max-call-depth exceeded
at /path/to/tests/functional/repl/doc-functor.nix:90:23:
89| */
90| __functor = self: self.__functor self;
| ^
91| };
nix-repl> :doc diverging
error:
… while partially calling '__functor' to retrieve documentation
(10000 duplicate frames omitted)
… while calling '__functor'
at /path/to/tests/functional/repl/doc-functor.nix:103:21:
102| f = x: {
103| __functor = self: (f (x + 1));
| ^
104| };
error: stack overflow; max-call-depth exceeded
at /path/to/tests/functional/repl/doc-functor.nix:103:28:
102| f = x: {
103| __functor = self: (f (x + 1));
| ^
104| };
nix-repl> :doc helper
Function `square`\
… defined at /path/to/tests/functional/repl/doc-functor.nix:36:12
Compute x^2
nix-repl> :doc helper2
Function `__functor`\
… defined at /path/to/tests/functional/repl/doc-functor.nix:46:13
This is a function that can be overridden.
nix-repl> :doc lib.helper3
Function `__functor`\
… defined at /path/to/tests/functional/repl/doc-functor.nix:46:13
This is a function that can be overridden.
nix-repl> :doc helper3
Function `__functor`\
… defined at /path/to/tests/functional/repl/doc-functor.nix:46:13
This is a function that can be overridden.