src/Pure/PIDE/document.ML
changeset 40481 da2c56aaaa68
parent 40449 9c390868d255
child 40520 77a7b0a7d4b1
equal deleted inserted replaced
40480:d695d258dfbc 40481:da2c56aaaa68
    96 fun edit_nodes (name, SOME edits) (Version nodes) =
    96 fun edit_nodes (name, SOME edits) (Version nodes) =
    97       Version (nodes
    97       Version (nodes
    98         |> Graph.default_node (name, empty_node)
    98         |> Graph.default_node (name, empty_node)
    99         |> Graph.map_node name (fold edit_node edits))
    99         |> Graph.map_node name (fold edit_node edits))
   100   | edit_nodes (name, NONE) (Version nodes) =
   100   | edit_nodes (name, NONE) (Version nodes) =
   101       Version (Graph.del_node name nodes);
   101       Version (perhaps (try (Graph.del_node name)) nodes);
   102 
   102 
   103 fun put_node name node (Version nodes) =
   103 fun put_node name node (Version nodes) =
   104   Version (Graph.map_node name (K node) nodes);
   104   Version (nodes
       
   105     |> Graph.default_node (name, empty_node)
       
   106     |> Graph.map_node name (K node));
   105 
   107 
   106 end;
   108 end;
   107 
   109 
   108 
   110 
   109 
   111