more specific notion of partiality (cf. Scala version);
authorwenzelm
Thu, 29 Mar 2012 22:43:50 +0200
changeset 47199 15ede9f1da3f
parent 47196 6012241abe93
child 47200 fbcb7024fc93
more specific notion of partiality (cf. Scala version);
src/Pure/PIDE/xml.ML
--- a/src/Pure/PIDE/xml.ML	Thu Mar 29 14:47:31 2012 +0200
+++ b/src/Pure/PIDE/xml.ML	Thu Mar 29 22:43:50 2012 +0200
@@ -327,7 +327,8 @@
 fun option _ NONE = []
   | option f (SOME x) = [node (f x)];
 
-fun variant fs x = [tagged (the (get_index (fn f => try f x) fs))];
+fun variant fs x =
+  [tagged (the (get_index (fn f => SOME (f x) handle General.Match => NONE) fs))];
 
 end;