src/Tools/Code/code_target.ML
changeset 39292 551fe1af03b0
parent 39291 c6d146ed07ae
child 39336 4ae1d212100f
     1.1 --- a/src/Tools/Code/code_target.ML	Thu Sep 02 14:36:49 2010 +0200
     1.2 +++ b/src/Tools/Code/code_target.ML	Thu Sep 02 14:59:28 2010 +0200
     1.3 @@ -73,9 +73,6 @@
     1.4  datatype destination = Export of Path.T option | Produce | Present of string list;
     1.5  type serialization = int -> destination -> (string * string option list) option;
     1.6  
     1.7 -fun stmt_names_of_destination (Present stmt_names) = stmt_names
     1.8 -  | stmt_names_of_destination _ = [];
     1.9 -
    1.10  fun serialization output _ content width (Export some_path) = (output width some_path content; NONE)
    1.11    | serialization _ string content width Produce = SOME (string [] width content)
    1.12    | serialization _ string content width (Present stmt_names) = SOME (string stmt_names width content);
    1.13 @@ -117,8 +114,7 @@
    1.14      tyco_syntax: string -> Code_Printer.tyco_syntax option,
    1.15      const_syntax: string -> Code_Printer.activated_const_syntax option,
    1.16      program: Code_Thingol.program,
    1.17 -    names: string list,
    1.18 -    presentation_names: string list }
    1.19 +    names: string list }
    1.20    -> serialization;
    1.21  
    1.22  datatype description = Fundamental of { serializer: serializer,
    1.23 @@ -309,7 +305,7 @@
    1.24  
    1.25  fun invoke_serializer thy abortable serializer literals reserved abs_includes 
    1.26      module_alias proto_class_syntax proto_instance_syntax proto_tyco_syntax proto_const_syntax
    1.27 -    module_name args naming proto_program (names, presentation_names) =
    1.28 +    module_name args naming proto_program names =
    1.29    let
    1.30      val (names_hidden, (class_syntax, tyco_syntax, const_syntax)) =
    1.31        activate_symbol_syntax thy literals naming
    1.32 @@ -326,19 +322,15 @@
    1.33        tyco_syntax = Symtab.lookup tyco_syntax,
    1.34        const_syntax = Symtab.lookup const_syntax,
    1.35        program = program,
    1.36 -      names = names,
    1.37 -      presentation_names = presentation_names }
    1.38 +      names = names }
    1.39    end;
    1.40  
    1.41 -fun mount_serializer thy target some_width raw_module_name args naming proto_program names destination =
    1.42 +fun mount_serializer thy target some_width module_name args naming proto_program names =
    1.43    let
    1.44      val (default_width, abortable, data, program) =
    1.45        activate_target_for thy target naming proto_program;
    1.46      val serializer = case the_description data
    1.47       of Fundamental seri => #serializer seri;
    1.48 -    val presentation_names = stmt_names_of_destination destination;
    1.49 -    val module_name = if null presentation_names
    1.50 -      then raw_module_name else "Code";
    1.51      val reserved = the_reserved data;
    1.52      fun select_include names_all (name, (content, cs)) =
    1.53        if null cs then SOME (name, content)
    1.54 @@ -355,7 +347,7 @@
    1.55    in
    1.56      invoke_serializer thy abortable serializer literals reserved
    1.57        includes module_alias class instance tyco const module_name args
    1.58 -        naming program (names, presentation_names) width destination
    1.59 +        naming program names width
    1.60    end;
    1.61  
    1.62  fun assert_module_name "" = error ("Empty module name not allowed.")