Use __functor to simplify combinators
By using `__functor` combinators can call each other directly by using `rec` rather than needing to mapAttrs over all of the combinators to inject them into each one.
This commit is contained in:
parent
313d10b952
commit
fce1224bdd
3 changed files with 42 additions and 44 deletions
|
|
@ -8,7 +8,7 @@
|
|||
lib = pkgs.lib;
|
||||
|
||||
formatCombinatorDoc = name: combinatorObj: let
|
||||
attrPos = builtins.unsafeGetAttrPos "impl" combinatorObj;
|
||||
attrPos = builtins.unsafeGetAttrPos "__functor" combinatorObj;
|
||||
file = lib.removePrefix (toString ./..) attrPos.file;
|
||||
in ''
|
||||
## ${name}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue