# HG changeset patch # User wenzelm # Date 1160177480 -7200 # Node ID 318f0ff93d994931b737f84375e006b7caccc0b5 # Parent 5dc02e7880be1ac6895e69e52ce0be320c239537 refined unlocalize_mixfix; diff -r 5dc02e7880be -r 318f0ff93d99 src/Pure/Syntax/mixfix.ML --- a/src/Pure/Syntax/mixfix.ML Sat Oct 07 01:31:19 2006 +0200 +++ b/src/Pure/Syntax/mixfix.ML Sat Oct 07 01:31:20 2006 +0200 @@ -30,7 +30,7 @@ val type_name: string -> mixfix -> string val const_name: string -> mixfix -> string val const_mixfix: string -> mixfix -> string * mixfix - val unlocalize_mixfix: mixfix -> mixfix + val unlocalize_mixfix: bool -> mixfix -> mixfix val mixfix_args: mixfix -> int end; @@ -138,9 +138,9 @@ | map_mixfix _ Structure = Structure | map_mixfix _ _ = raise Fail ("map_mixfix: illegal occurrence of unnamed infix"); -fun unlocalize_mixfix mx = +fun unlocalize_mixfix loc mx = let val mx' = map_mixfix SynExt.unlocalize_mfix mx - in if mx = mx' then NoSyn else mx' end; + in if mx = mx' andalso loc then NoSyn else mx' end; fun mixfix_args NoSyn = 0 | mixfix_args (Mixfix (sy, _, _)) = SynExt.mfix_args sy diff -r 5dc02e7880be -r 318f0ff93d99 src/Pure/Tools/class_package.ML --- a/src/Pure/Tools/class_package.ML Sat Oct 07 01:31:19 2006 +0200 +++ b/src/Pure/Tools/class_package.ML Sat Oct 07 01:31:20 2006 +0200 @@ -285,7 +285,7 @@ | _ => error ("More than one type variable in type signature of constant " ^ quote c)); val consts1 = Locale.parameters_of thy name_locale - |> map (apsnd Syntax.unlocalize_mixfix) + |> map (apsnd (Syntax.unlocalize_mixfix true)) val SOME v = fold extract_classvar consts1 NONE; val consts2 = map ((apfst o apsnd) (subst_clsvar v (TFree (v, [])))) consts1; in (v, chop (length mapp_sup) consts2) end;