:doc command unfolds partial applications even when definition has documentation
Author: leana8959Created Sep 27, 2026Updated Sep 29, 2026
Labelsbug
Describe the bug
In the following snippet, :doc bar will explain foo instead of bar because bar is foo partially applied.
Steps To Reproduce
Save this to a file. In the repl, run :doc bar.
rec {
/**
foo
*/
foo = _: _: {};
/**
bar
*/
bar = foo {};
}Expected behavior
Nix should not try to find the documentation of the underlying function. Or, alternatively, it should allow a pragma comment to specify whether it tries to find the documentation of the underlying function.
Metadata
nix-env (Nix) 2.34.8Additional context
Checklist
- checked latest Nix manual (source)
- checked open bug issues and pull requests for possible duplicates
- reviewed the contributing guide
Add :+1: to issues you find important.
Source: NixOS/nix