src/Tools/Code/code_namespace.ML
changeset 39024 30d5dd2f30b6
parent 39023 3f70c03e8282
child 39029 cef7b58555aa
--- a/src/Tools/Code/code_namespace.ML	Wed Sep 01 17:14:42 2010 +0200
+++ b/src/Tools/Code/code_namespace.ML	Wed Sep 01 17:21:50 2010 +0200
@@ -14,7 +14,7 @@
     reserved: Name.context, empty_nsp: 'c, namify_module: string -> 'c -> string * 'c,
     namify_stmt: Code_Thingol.stmt -> string -> 'c -> string * 'c,
     cyclic_modules: bool, empty_data: 'b, memorize_data: string -> 'b -> 'b,
-    modify_stmts: Code_Thingol.stmt list -> 'a option list }
+    modify_stmts: (string * Code_Thingol.stmt) list -> 'a option list }
       -> Code_Thingol.program
       -> { deresolver: string list -> string -> string,
            hierarchical_program: (string * ('a, 'b) node) Graph.T }
@@ -109,8 +109,7 @@
           #> AList.make (snd o Graph.get_node nodes)
           #> split_list
           ##> map (fn Stmt stmt => stmt)
-          ##> modify_stmts
-          #> op ~~;
+          #> (fn (names, stmts) => names ~~ modify_stmts (names ~~ stmts));
         val stmtss' = maps modify_stmts' (Graph.strong_conn nodes);
         val nodes'' = Graph.map (fn name => apsnd (fn Module content => Module (make_declarations nsps' content)
             | _ => case AList.lookup (op =) stmtss' name of SOME (SOME stmt) => Stmt stmt | _ => Dummy)) nodes';