-
-
Save grahamc/5e27f2697fba2636cf0078bb590eb89e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
trace' = t: builtins.trace t t; | |
toplevel = rec { | |
middle = { | |
lower = "hi"; # <---------------------------------------------------, | |
}; # | | |
inherit (middle) lower; # <--------------------------------------, | | |
}; # | | | |
# | | | |
# currently, unsafeGetAttrPos will identify 'lower' is defined at -/ | | |
# | | |
# instead of -----------------------------------------------------------/ | |
# _POSSIBLY_ even, if possible, it'd be cool to have: | |
# { | |
# line = 9; | |
# column = 21; | |
# file = "/home/grahamc/projects/nixpkgs/x.nix"; | |
# parent = { | |
# line = 8; | |
# column = 7; | |
# file = "/home/grahamc/projects/nixpkgs/x.nix"; | |
# parent = null; | |
# }; | |
# } | |
loc = builtins.unsafeGetAttrPos "lower" toplevel; | |
in trace' loc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment