The idiomatic way to shadow a variable in nix is vie nested lets:
let x = 10; in let x_ = x; in let x = x_ + 1; in x
But statix collapses the lets seemingly without paying attention to the variables defined:
let x = 10; x_ = x; x = x_ + 1; in x
This is error, x is defined twice. Or it could turn it into infinite recursion by changing (x: let x_ = x; in let x = x_ + 1; in x) 10 to (x: let x_ = x; x = x_ + 1; in x) 10
Since lets define a mutually recursive block, they can only be merged if the inner let doesn't define any variables defined in the outer one.
This is true of 0.5.8 as in nixpkgs, looks like it's up to date with the repo, which is also at 0.5.8.
The idiomatic way to shadow a variable in nix is vie nested lets:
But statix collapses the lets seemingly without paying attention to the variables defined:
This is error,
x
is defined twice. Or it could turn it into infinite recursion by changing(x: let x_ = x; in let x = x_ + 1; in x) 10
to(x: let x_ = x; x = x_ + 1; in x) 10
Since lets define a mutually recursive block, they can only be merged if the inner let doesn't define any variables defined in the outer one.
This is true of 0.5.8 as in nixpkgs, looks like it's up to date with the repo, which is also at 0.5.8.