dropped dead code
authorhaftmann
Fri Jun 18 09:04:00 2010 +0200 (2010-06-18)
changeset 3745344a307746163
parent 37452 8f515d6aded5
child 37455 059ee3176686
child 37457 7201c7e0db87
dropped dead code
src/Tools/Code/code_scala.ML
     1.1 --- a/src/Tools/Code/code_scala.ML	Thu Jun 17 19:32:05 2010 +0200
     1.2 +++ b/src/Tools/Code/code_scala.ML	Fri Jun 18 09:04:00 2010 +0200
     1.3 @@ -297,45 +297,6 @@
     1.4              val body = [str "new", print_classtyp' classtyp,
     1.5                Pretty.enum ";" "{ " " }" (map print_classparam_instance (classparam_instances @ further_classparam_instances))];
     1.6            in concat (str "implicit" :: head :: body) end;
     1.7 -          (*let
     1.8 -            val tyvars = intro_vars (map fst vs) reserved;
     1.9 -            val insttyp = tyco `%% map (ITyVar o fst) vs;
    1.10 -            val p_inst_typ = print_typ tyvars NOBR insttyp;
    1.11 -            fun add_typ_params p = applify "[" "]" NOBR p (map (str o lookup_tyvar tyvars o fst) vs);
    1.12 -            fun add_inst_typ p = Pretty.block [p, str "[", p_inst_typ, str "]"];
    1.13 -            val ((implicit_names, implicit_ps), vars) = implicit_arguments tyvars vs reserved;
    1.14 -            fun print_classparam_instance ((classparam, const as (_, (_, tys))), (thm, _)) =
    1.15 -              let
    1.16 -                val auxs = Name.invents (snd reserved) "a" (length tys);
    1.17 -                val vars = intro_vars auxs reserved;
    1.18 -                val args = if null auxs then [] else
    1.19 -                  [concat [enum "," "(" ")" (map2 (fn aux => fn ty => print_typed tyvars ((str o lookup_var vars) aux) ty)
    1.20 -                    auxs tys), str "=>"]];
    1.21 -              in 
    1.22 -                concat ([str "val", (str o Library.enclose "`" "+`" o deresolve_base) classparam,
    1.23 -                  str "="] @ args @ [print_app tyvars false (SOME thm) vars NOBR (const, map (IVar o SOME) auxs)])
    1.24 -              end;
    1.25 -          in
    1.26 -            Pretty.chunks [
    1.27 -              Pretty.block_enclose
    1.28 -                (concat ([str "trait",
    1.29 -                    add_typ_params ((str o deresolve_base) name),
    1.30 -                    str "extends",
    1.31 -                    Pretty.block [(str o deresolve) class, str "[", p_inst_typ, str "]"]]
    1.32 -                    @ map (fn (_, (_, (super_instance, _))) => add_typ_params (str ("with " ^ deresolve super_instance)))
    1.33 -                      super_instances @| str "{"), str "}")
    1.34 -                (map (fn p => Pretty.block [str "implicit val arg$", p]) implicit_ps
    1.35 -                  @ map print_classparam_instance classparam_instances),
    1.36 -              concat [str "implicit", str (if null vs then "val" else "def"),
    1.37 -                applify "(implicit " ")" NOBR (applify "[" "]" NOBR
    1.38 -                  ((str o deresolve_base) name) (map (str o lookup_tyvar tyvars o fst) vs))
    1.39 -                    implicit_ps,
    1.40 -                  str "=", str "new", applify "[" "]" NOBR ((str o deresolve_base) name)
    1.41 -                      (map (str o lookup_tyvar tyvars o fst) vs),
    1.42 -                    Pretty.enum ";" "{ " " }" (map (str o (fn v => "val arg$" ^ v ^ " = " ^ v) o lookup_var vars)
    1.43 -                      implicit_names)]
    1.44 -            ]
    1.45 -          end;*)
    1.46    in print_stmt end;
    1.47  
    1.48  fun scala_program_of_program labelled_name module_name reserved raw_module_alias program =