Skip to content

:doc command unfolds partial applications even when definition has documentation #16531

Description

@leana8959

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.8

Additional context

Checklist


Add 👍 to issues you find important.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions