1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

Add a primop unsafeGetAttrPos to return the position of an attribute

This commit is contained in:
Eelco Dolstra 2013-11-18 22:22:35 +01:00
parent fc33fd86b7
commit 285df765b9
6 changed files with 44 additions and 6 deletions

View file

@ -0,0 +1 @@
{ column = 5; file = "eval-okay-getattrpos.nix"; line = 3; }

View file

@ -0,0 +1,6 @@
let
as = {
foo = "bar";
};
pos = builtins.unsafeGetAttrPos "foo" as;
in { inherit (pos) column line; file = baseNameOf pos.file; }