more specific notion of partiality (cf. Scala version);
authorwenzelm
Thu, 29 Mar 2012 22:43:50 +0200
changeset 4807015ede9f1da3f
parent 48067 6012241abe93
child 48071 fbcb7024fc93
more specific notion of partiality (cf. Scala version);
src/Pure/PIDE/xml.ML
     1.1 --- a/src/Pure/PIDE/xml.ML	Thu Mar 29 14:47:31 2012 +0200
     1.2 +++ b/src/Pure/PIDE/xml.ML	Thu Mar 29 22:43:50 2012 +0200
     1.3 @@ -327,7 +327,8 @@
     1.4  fun option _ NONE = []
     1.5    | option f (SOME x) = [node (f x)];
     1.6  
     1.7 -fun variant fs x = [tagged (the (get_index (fn f => try f x) fs))];
     1.8 +fun variant fs x =
     1.9 +  [tagged (the (get_index (fn f => SOME (f x) handle General.Match => NONE) fs))];
    1.10  
    1.11  end;
    1.12