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