From cd278c31d441acda3c4f91adec0b77d47ab97366 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 30 Nov 2014 03:29:46 -0500 Subject: [PATCH] Partial applications now manipulate fnref arity Previously, a separate `@partial' attribute was added to the ref and the `@arity' maintained. Unfortunately, this coupled `f:arity' with `f:partial', which is unnecessary, considering that partial application is supposed to conceptually yield a new function, which should be transparent to `f:arity'. --- src/apply/partial.xsl | 8 ++++---- src/apply/ref.xsl | 10 +++------- test/apply/partial.xspec | 33 ++++++++++++++++++--------------- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/apply/partial.xsl b/src/apply/partial.xsl index 8a8fcba..98700be 100644 --- a/src/apply/partial.xsl +++ b/src/apply/partial.xsl @@ -98,8 +98,9 @@ - + + @@ -128,8 +129,7 @@ + and exists( $fnref[ 2 ] )" /> diff --git a/src/apply/ref.xsl b/src/apply/ref.xsl index 8c6df09..3ea34de 100644 --- a/src/apply/ref.xsl +++ b/src/apply/ref.xsl @@ -135,16 +135,12 @@ + - - - + diff --git a/test/apply/partial.xspec b/test/apply/partial.xspec index eda5a53..33e3743 100644 --- a/test/apply/partial.xspec +++ b/test/apply/partial.xspec @@ -51,11 +51,9 @@ - - - + @@ -68,12 +66,13 @@ - - - + + @@ -108,8 +107,10 @@ - + @@ -406,7 +407,9 @@ + assert on that; we are going to explicitly choose to *not* + support that behavior, since an fnref acquires meaning as an + opaque unit --> @@ -414,8 +417,8 @@ select="f:partial( foo:ternary(), (1, 2) )[ 1 ]" /> - +