[Nix-dev] maximal sharing and comparisons.

Marc Weber marco-oweber at gmx.de
Sun Nov 23 16:23:21 CET 2008


You're all right, we have to think about what equality means here.

The most sensible thing would be:

  1)
  7 == (_plus 6 1) is equal 

the same way
  2)

  let f = __trace "foo" (_plus 6 1)
  in f == f
is without printing "foo"..

So if the terms are the same we don't have to evaluate them. But if they
are not we have to evaluate them to make a final decision because the 7
= 6+1 example should hold.

Marc Weber



More information about the nix-dev mailing list