improve functor tracking

This commit is contained in:
Johannes Kirschbauer 2024-01-05 11:37:51 +01:00 committed by Johannes Kirschbauer
parent 50e35a47eb
commit 9283bc08e6
2 changed files with 8 additions and 7 deletions

View File

@ -1,10 +1,7 @@
{
# import (builtins.fetchTree {
# repo = "nixpkgs";
# ref = "migrate-doc-comments";
# owner = "hsjobeki";
# type = "github";
# }) {},
#
# All these arguments can be overriden in production build
#
nixpkgs ? (builtins.fetchTree {
repo = "nixpkgs";
ref = "master";

View File

@ -4,6 +4,7 @@ let
dropBack = l: lib.reverseList (lib.drop 1 (lib.reverseList l));
unwrapFunctor = f: f.__functor f;
/* *
# Returns
@ -23,6 +24,9 @@ let
let
lambda =
if lib.isFunction parent.${name} then
if parent.${name} ? __functor then
builtins.lambdaMeta (unwrapFunctor parent.${name})
else
builtins.lambdaMeta parent.${name}
else
null;