src/Tools/code/code_target.ML
changeset 25771 a81c0ad97133
parent 25621 97ebdbdb0299
child 25936 f43bac9def6e
     1.1 --- a/src/Tools/code/code_target.ML	Wed Jan 02 15:14:26 2008 +0100
     1.2 +++ b/src/Tools/code/code_target.ML	Wed Jan 02 15:14:27 2008 +0100
     1.3 @@ -60,6 +60,8 @@
     1.4  val concat = Pretty.block o Pretty.breaks;
     1.5  val brackets = Pretty.enclose "(" ")" o Pretty.breaks;
     1.6  fun semicolon ps = Pretty.block [concat ps, str ";"];
     1.7 +fun enum_default default sep opn cls [] = str default
     1.8 +  | enum_default default sep opn cls xs = Pretty.enum sep opn cls xs;
     1.9  
    1.10  
    1.11  (** syntax **)
    1.12 @@ -863,7 +865,7 @@
    1.13                str ("type '" ^ v),
    1.14                (str o deresolv) class,
    1.15                str "=",
    1.16 -              Pretty.enum ";" "{" "};;" (
    1.17 +              enum_default "();;" ";" "{" "};;" (
    1.18                  map pr_superclass_field superclasses
    1.19                  @ map pr_classparam_field classparams
    1.20                )
    1.21 @@ -891,7 +893,7 @@
    1.22                :: pr_tyvars arity
    1.23                @ str "="
    1.24                @@ (Pretty.enclose "(" ");;" o Pretty.breaks) [
    1.25 -                Pretty.enum ";" "{" "}" (map pr_superclass superarities
    1.26 +                enum_default "()" ";" "{" "}" (map pr_superclass superarities
    1.27                    @ map pr_classparam_inst classparam_insts),
    1.28                  str ":",
    1.29                  pr_tycoexpr NOBR (class, [tyco `%% map (ITyVar o fst) arity])