--- a/src/Tools/Code/code_haskell.ML Thu Nov 25 14:59:01 2010 +0100
+++ b/src/Tools/Code/code_haskell.ML Thu Nov 25 15:40:41 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))
--- a/src/Tools/Code/code_namespace.ML Thu Nov 25 14:59:01 2010 +0100
+++ b/src/Tools/Code/code_namespace.ML Thu Nov 25 15:40:41 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;