Lines Matching defs:tab
97 fun is_empty (Keys tab) = Table.is_empty tab;
99 fun member (Keys tab) = Table.defined tab;
100 fun insert x (Keys tab) =
101 Keys (Table.insert (fn _ => fn _ => true) (x, ()) tab);
102 fun remove x (Keys tab) = Keys (Table.delete_safe x tab);
104 fun fold f (Keys tab) = Table.fold (f o #1) tab;
105 fun fold_rev f (Keys tab) = Table.fold_rev (f o #1) tab;
124 fun is_empty (Graph tab) = Table.is_empty tab;
125 fun keys (Graph tab) = Table.keys tab;
127 fun get_first f (Graph tab) = Table.get_first f tab;
128 fun fold_graph f (Graph tab) = Table.fold f tab;
130 fun get_entry (Graph tab) x =
131 (case Table.lookup_key tab x of
135 fun map_entry x f (G as Graph tab) =
136 Graph (Table.update (x, f (#2 (get_entry G x))) tab);
145 fun map_nodes f (Graph tab) = Graph (Table.map (apfst o f) tab);
183 val tab' = Table.empty |> foldl' map' xss
185 map_nodes (fn x => fn _ => valOf (Table.lookup tab' x)) G
203 fun new_node (x, info) (Graph tab) =
204 Graph (Table.update_new (x, (info, (Keys.empty, Keys.empty))) tab);
206 fun default_node (x, info) (Graph tab) =
207 Graph (Table.default (x, (info, (Keys.empty, Keys.empty))) tab);
209 fun del_node x (G as Graph tab) =
215 Graph (tab
353 val results = (xs, Table.empty) ||-> foldl' (fn x => fn tab =>
357 (case Table.lookup tab y of
360 in Table.update (x, f deps (x, a)) tab end);