Hi Everyone,

I'm working on a research project that involves converting Nix attrs
into XML and vice versa.  Using nix-instantiate with --xml works great
except that boolean types like:

        ttyBackgrounds = {
                enable = true;
        };

get translated into XML as:
         <attr name="ttyBackgrounds">
             <unevaluated />
         </attr>
         
regardless of the actual value.  Is this the normal behavior or a bug?
Poking around a bit in expr-to-xml.cc it looks like:
    else if (e == eTrue)
         doc.writeEmptyElement("bool", singletonAttrs("value", "true"));
    else if (e == eFalse)
        doc.writeEmptyElement("bool", singletonAttrs("value", "false"));

should handle this case but it is falling through.  Am I missing
something obvious here?

respectfully,

James Unger
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to