fake.modules transposition for aspect-oriented Dendritic Nix. with cross-aspect dependencies. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ dendrix.oeiuwq.com/Dendritic.html
dendritic nix aspect oriented

cleanup

+13 -13
+9 -11
checkmate.nix
··· 401 401 flake.aspects = 402 402 { aspects, ... }: 403 403 { 404 - aspectOne = 405 - { aspect, ... }: 406 - { 407 - classOne.bar = [ "should-not-be-present" ]; 408 - includes = [ aspects.aspectTwo ]; 409 - __functor = _: { 410 - includes = [ 411 - { classOne.bar = [ "from-functor" ]; } 412 - ] ++ map (f: f { message = "hello"; }) aspect.includes; 413 - }; 404 + aspectOne = { 405 + classOne.bar = [ "should-not-be-present" ]; 406 + includes = [ aspects.aspectTwo ]; 407 + __functor = aspect: { 408 + includes = [ 409 + { classOne.bar = [ "from-functor" ]; } 410 + ] ++ map (f: f { message = "hello"; }) aspect.includes; 414 411 }; 412 + }; 415 413 aspectTwo.__functor = 416 - _: 414 + _aspect: 417 415 { message }: 418 416 { 419 417 classOne.bar = [ message ];
+4 -2
nix/types.nix
··· 82 82 visible = false; 83 83 description = "Functor to default provider"; 84 84 type = lib.types.functionTo providerType; 85 - default = _: aspect.provides.itself; 85 + default = aspect: aspect.provides.itself; 86 86 }; 87 87 options.resolve = lib.mkOption { 88 88 internal = true; ··· 95 95 class, 96 96 aspect-chain ? [ ], 97 97 }: 98 - resolve class aspect-chain (aspect.__functor aspect { inherit class aspect-chain; }); 98 + resolve class aspect-chain (aspect { 99 + inherit class aspect-chain; 100 + }); 99 101 }; 100 102 } 101 103 );