Skip to content

Instantly share code, notes, and snippets.

@danielphan2003
Created August 20, 2022 21:33
Show Gist options
  • Save danielphan2003/1cea56ef4ad92be33fc03c616cdb1801 to your computer and use it in GitHub Desktop.
Save danielphan2003/1cea56ef4ad92be33fc03c616cdb1801 to your computer and use it in GitHub Desktop.
{
a = implicit attrs; /*
implicit means it has to be accessed via `args.<implicit>`
Normally you can use `f = {implicit, ...}@args: implicit`,
but what if `f` is within the following function:
```nix
{implicit}: {
f = {implicit, ...}@args: implicit;
}
```
As you can see, we can't reasonably tell the scope of `implicit`,
so it is best to avoid explicit mentions unless top-level `functionArgs`
and current scope's does not intersect.
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment