[Nix-dev] builtins.toXML vs nix-instantiate --xml

Eelco Dolstra eelco.dolstra at logicblox.com
Fri May 23 14:26:19 CEST 2014


Hi,

On 23/05/14 11:06, Ludovic Courtès wrote:

> The ‘printValueAsXML’ function in libexpr has an optional ‘location’
> Boolean parameter, which determines whether to emit source location
> information or not.
> 
> ‘nix-instantiate’ sets that to true, but the ‘toXML’ primop doesn’t do
> that.  

It doesn't do that because it would break referential transparency, e.g.

  toXML { x = 1; } == toXML { x = 1; }

would evaluate to false.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list