nix-super/tests/lang/eval-okay-xml.exp.xml
Eelco Dolstra 1b962fc720 * @-patterns as in Haskell. For instance, in a function definition
f = args @ {x, y, z}: ...;

  `args' refers to the argument as a whole, which is further
  pattern-matched against the attribute set pattern {x, y, z}.
2008-08-14 12:53:29 +00:00

43 lines
866 B
XML

<?xml version='1.0' encoding='utf-8'?>
<expr>
<attrs>
<attr name="a">
<string value="foo" />
</attr>
<attr name="at">
<function>
<at>
<varpat name="args" />
<attrspat>
<attr name="x" />
<attr name="y" />
<attr name="z" />
</attrspat>
</at>
</function>
</attr>
<attr name="b">
<string value="bar" />
</attr>
<attr name="c">
<string value="foobar" />
</attr>
<attr name="f">
<function>
<attrspat>
<attr name="z" />
<attr name="x" />
<attr name="y" />
</attrspat>
</function>
</attr>
<attr name="id">
<function>
<varpat name="x" />
</function>
</attr>
<attr name="x">
<int value="123" />
</attr>
</attrs>
</expr>