mirror of
https://github.com/nix-community/noogle.git
synced 2024-11-23 00:33:12 +03:00
improve functor tracking
This commit is contained in:
parent
50e35a47eb
commit
9283bc08e6
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
# import (builtins.fetchTree {
|
#
|
||||||
# repo = "nixpkgs";
|
# All these arguments can be overriden in production build
|
||||||
# ref = "migrate-doc-comments";
|
#
|
||||||
# owner = "hsjobeki";
|
|
||||||
# type = "github";
|
|
||||||
# }) {},
|
|
||||||
nixpkgs ? (builtins.fetchTree {
|
nixpkgs ? (builtins.fetchTree {
|
||||||
repo = "nixpkgs";
|
repo = "nixpkgs";
|
||||||
ref = "master";
|
ref = "master";
|
||||||
|
@ -4,6 +4,7 @@ let
|
|||||||
|
|
||||||
dropBack = l: lib.reverseList (lib.drop 1 (lib.reverseList l));
|
dropBack = l: lib.reverseList (lib.drop 1 (lib.reverseList l));
|
||||||
|
|
||||||
|
unwrapFunctor = f: f.__functor f;
|
||||||
/* *
|
/* *
|
||||||
# Returns
|
# Returns
|
||||||
|
|
||||||
@ -23,7 +24,10 @@ let
|
|||||||
let
|
let
|
||||||
lambda =
|
lambda =
|
||||||
if lib.isFunction parent.${name} then
|
if lib.isFunction parent.${name} then
|
||||||
builtins.lambdaMeta parent.${name}
|
if parent.${name} ? __functor then
|
||||||
|
builtins.lambdaMeta (unwrapFunctor parent.${name})
|
||||||
|
else
|
||||||
|
builtins.lambdaMeta parent.${name}
|
||||||
else
|
else
|
||||||
null;
|
null;
|
||||||
attr = { position = builtins.unsafeGetAttrPos name parent; };
|
attr = { position = builtins.unsafeGetAttrPos name parent; };
|
||||||
|
Loading…
Reference in New Issue
Block a user