more coherent naming with ML serializer
authorhaftmann
Thu Apr 29 15:00:42 2010 +0200 (2010-04-29)
changeset 365350195ef994077
parent 36534 0090b04432f7
child 36536 8daaa303f90d
more coherent naming with ML serializer
src/Tools/Code/code_haskell.ML
src/Tools/Code/code_scala.ML
     1.1 --- a/src/Tools/Code/code_haskell.ML	Thu Apr 29 15:00:42 2010 +0200
     1.2 +++ b/src/Tools/Code/code_haskell.ML	Thu Apr 29 15:00:42 2010 +0200
     1.3 @@ -309,10 +309,10 @@
     1.4  
     1.5  fun serialize_haskell module_prefix raw_module_name string_classes labelled_name
     1.6      raw_reserved includes raw_module_alias
     1.7 -    syntax_class syntax_tyco syntax_const (code_of_pretty, code_writeln) program cs destination =
     1.8 +    syntax_class syntax_tyco syntax_const (code_of_pretty, code_writeln) program stmt_names destination =
     1.9    let
    1.10 -    val stmt_names = Code_Target.stmt_names_of_destination destination;
    1.11 -    val module_name = if null stmt_names then raw_module_name else SOME "Code";
    1.12 +    val presentation_stmt_names = Code_Target.stmt_names_of_destination destination;
    1.13 +    val module_name = if null presentation_stmt_names then raw_module_name else SOME "Code";
    1.14      val reserved = fold (insert (op =) o fst) includes raw_reserved;
    1.15      val (deresolver, hs_program) = haskell_program_of_program labelled_name
    1.16        module_name module_prefix reserved raw_module_alias program;
    1.17 @@ -365,13 +365,13 @@
    1.18            );
    1.19        in print_module module_name' content end;
    1.20      fun serialize_module2 (_, (_, (stmts, _))) = Pretty.chunks2 (map_filter
    1.21 -        (fn (name, (_, SOME stmt)) => if null stmt_names
    1.22 -              orelse member (op =) stmt_names name
    1.23 +        (fn (name, (_, SOME stmt)) => if null presentation_stmt_names
    1.24 +              orelse member (op =) presentation_stmt_names name
    1.25                then SOME (print_stmt false (name, stmt))
    1.26                else NONE
    1.27            | (_, (_, NONE)) => NONE) stmts);
    1.28      val serialize_module =
    1.29 -      if null stmt_names then serialize_module1 else pair "" o serialize_module2;
    1.30 +      if null presentation_stmt_names then serialize_module1 else pair "" o serialize_module2;
    1.31      fun check_destination destination =
    1.32        (File.check destination; destination);
    1.33      fun write_module destination (modlname, content) =
     2.1 --- a/src/Tools/Code/code_scala.ML	Thu Apr 29 15:00:42 2010 +0200
     2.2 +++ b/src/Tools/Code/code_scala.ML	Thu Apr 29 15:00:42 2010 +0200
     2.3 @@ -340,10 +340,10 @@
     2.4  
     2.5  fun serialize_scala raw_module_name labelled_name
     2.6      raw_reserved includes raw_module_alias
     2.7 -    _ syntax_tyco syntax_const (code_of_pretty, code_writeln) program cs destination =
     2.8 +    _ syntax_tyco syntax_const (code_of_pretty, code_writeln) program stmt_names destination =
     2.9    let
    2.10 -    val stmt_names = Code_Target.stmt_names_of_destination destination;
    2.11 -    val module_name = if null stmt_names then raw_module_name else SOME "Code";
    2.12 +    val presentation_stmt_names = Code_Target.stmt_names_of_destination destination;
    2.13 +    val module_name = if null presentation_stmt_names then raw_module_name else SOME "Code";
    2.14      val reserved = fold (insert (op =) o fst) includes raw_reserved;
    2.15      val (deresolver, (the_module_name, sca_program)) = scala_program_of_program labelled_name
    2.16        module_name reserved raw_module_alias program;