[Bug 5795] Static Typing: CVS: K2-Steps-2, K2-FunctionProlog-14

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5795





--- Comment #2 from Tim Mills <tim@cbcl.co.uk>  2008-06-24 14:00:10 ---
Refer to:

http://www.w3.org/TR/xquery/#id-errors-and-opt

"Consider an expression Q that has an operand (sub-expression) E. In general
the value of E is a sequence. At an intermediate stage during evaluation of the
sequence, some of its items will be known and others will be unknown. If, at
such an intermediate stage of evaluation, a processor is able to establish that
there are only two possible outcomes of evaluating Q, namely the value V or an
error, then the processor may deliver the result V without evaluating further
items in the operand E. For this purpose, two values are considered to
represent the same outcome if their items are pairwise the same, where nodes
are the same if they have the same identity, and values are the same if they
are equal and have exactly the same type."

I agree it isn't intuitive, but I'm sure it is correct.  I rather wish the type
of fn:error was, in Haskell style:

empty-sequence() IO 

(indicating an expression with side effects) rather than

none

which I believe would help to get rid of these oddities (and clean up XQuery
Update).


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 24 June 2008 14:00:45 UTC