src/Tools/Code/code_ml.ML
changeset 56812 baef1c110f12
parent 55776 7dd1971b39c1
child 56826 ba18bd41e510
     1.1 --- a/src/Tools/Code/code_ml.ML	Thu May 01 09:30:35 2014 +0200
     1.2 +++ b/src/Tools/Code/code_ml.ML	Thu May 01 09:30:36 2014 +0200
     1.3 @@ -84,8 +84,8 @@
     1.4              (if is_pseudo_fun (Class_Instance inst) then [str "()"]
     1.5              else map_filter (print_dicts is_pseudo_fun BR) dss))
     1.6        | print_plain_dict is_pseudo_fun fxy (Dict_Var (v, (i, k))) =
     1.7 -          [str (if k = 1 then first_upper v ^ "_"
     1.8 -            else first_upper v ^ string_of_int (i+1) ^ "_")]
     1.9 +          [str (if k = 1 then Name.enforce_case true v ^ "_"
    1.10 +            else Name.enforce_case true v ^ string_of_int (i+1) ^ "_")]
    1.11      and print_dicts is_pseudo_fun = tuplify (print_dict is_pseudo_fun);
    1.12      val print_dict_args = map_filter (fn (v, sort) => print_dicts (K false) BR
    1.13        (map_index (fn (i, _) => Dict ([], Dict_Var (v, (i, length sort)))) sort));
    1.14 @@ -395,8 +395,8 @@
    1.15              (if is_pseudo_fun (Class_Instance inst) then [str "()"]
    1.16              else map_filter (print_dicts is_pseudo_fun BR) dss))
    1.17        | print_plain_dict is_pseudo_fun fxy (Dict_Var (v, (i, k))) =
    1.18 -          str (if k = 1 then "_" ^ first_upper v
    1.19 -            else "_" ^ first_upper v ^ string_of_int (i+1))
    1.20 +          str (if k = 1 then "_" ^ Name.enforce_case true v
    1.21 +            else "_" ^ Name.enforce_case true v ^ string_of_int (i+1))
    1.22      and print_dicts is_pseudo_fun = tuplify (print_dict is_pseudo_fun);
    1.23      val print_dict_args = map_filter (fn (v, sort) => print_dicts (K false) BR
    1.24        (map_index (fn (i, _) => Dict ([], Dict_Var (v, (i, length sort)))) sort));
    1.25 @@ -655,7 +655,7 @@
    1.26                  (Constant classparam, ([(v, [class])], ty));
    1.27              fun print_classparam_field (classparam, ty) =
    1.28                print_field (deresolve_const classparam) (print_typ NOBR ty);
    1.29 -            val w = "_" ^ first_upper v;
    1.30 +            val w = "_" ^ Name.enforce_case true v;
    1.31              fun print_classparam_proj (classparam, _) =
    1.32                (concat o map str) ["let", deresolve_const classparam, w, "=",
    1.33                  w ^ "." ^ deresolve_const classparam ^ ";;"];
    1.34 @@ -724,7 +724,7 @@
    1.35      fun namify_const upper base (nsp_const, nsp_type) =
    1.36        let
    1.37          val (base', nsp_const') =
    1.38 -          Name.variant (if upper then first_upper base else base) nsp_const
    1.39 +          Name.variant (if upper then Name.enforce_case true base else base) nsp_const
    1.40        in (base', (nsp_const', nsp_type)) end;
    1.41      fun namify_type base (nsp_const, nsp_type) =
    1.42        let