src/HOL/List.thy
changeset 51272 9c8d63b4b6be
parent 51173 3cbb4e95a565
child 51314 eac4bb5adbf9
equal deleted inserted replaced
51271:e8d2ecf6aaac 51272:9c8d63b4b6be
   442           in concatC $ (mapC $ (fst (abs_tr ctxt p e' false)) $ es) end;
   442           in concatC $ (mapC $ (fst (abs_tr ctxt p e' false)) $ es) end;
   443 
   443 
   444   in [(@{syntax_const "_listcompr"}, lc_tr)] end
   444   in [(@{syntax_const "_listcompr"}, lc_tr)] end
   445 *}
   445 *}
   446 
   446 
   447 ML {*
   447 ML_val {*
   448   let
   448   let
   449     val read = Syntax.read_term @{context};
   449     val read = Syntax.read_term @{context};
   450     fun check s1 s2 = read s1 aconv read s2 orelse error ("Check failed: " ^ quote s1);
   450     fun check s1 s2 = read s1 aconv read s2 orelse error ("Check failed: " ^ quote s1);
   451   in
   451   in
   452     check "[(x,y,z). b]" "if b then [(x, y, z)] else []";
   452     check "[(x,y,z). b]" "if b then [(x, y, z)] else []";