# HG changeset patch # User haftmann # Date 1290766009 -3600 # Node ID 739dc2c2ba24a25ca5279070513deb4842a28b7d # Parent 407c6122956fe4f9cfbf3b055a2c94831c0b9841# Parent 299cfb93fee980a167260c9af5fb9ce7fec4b193 merged diff -r 407c6122956f -r 739dc2c2ba24 src/Tools/Code/code_haskell.ML --- a/src/Tools/Code/code_haskell.ML Fri Nov 26 10:04:04 2010 +0100 +++ b/src/Tools/Code/code_haskell.ML Fri Nov 26 11:06:49 2010 +0100 @@ -362,7 +362,7 @@ in Code_Target.serialization (fn width => fn destination => K () o map (write_module width destination)) - (fn present => fn width => rpair (fn _ => error "no deresolving") + (fn present => fn width => rpair (try (deresolver "")) o format present width o Pretty.chunks o map snd) (map (uncurry print_module_frame o apsnd single) includes @ map (fn module_name => print_module module_name (Graph.get_node haskell_program module_name)) diff -r 407c6122956f -r 739dc2c2ba24 src/Tools/Code/code_namespace.ML --- a/src/Tools/Code/code_namespace.ML Fri Nov 26 10:04:04 2010 +0100 +++ b/src/Tools/Code/code_namespace.ML Fri Nov 26 11:06:49 2010 +0100 @@ -121,9 +121,11 @@ val deresolver_tab = Symtab.make (AList.make (uncurry classify_names o Graph.get_node flat_program) (Graph.keys flat_program)); - fun deresolver module_name name = - the (Symtab.lookup (the (Symtab.lookup deresolver_tab module_name)) name) - handle Option => error ("Unknown statement name: " ^ labelled_name name); + fun deresolver "" name = + Long_Name.append (fst (dest_name name)) (base_deresolver name) + | deresolver module_name name = + the (Symtab.lookup (the (Symtab.lookup deresolver_tab module_name)) name) + handle Option => error ("Unknown statement name: " ^ labelled_name name); in { deresolver = deresolver, flat_program = flat_program } end;