internal_abbrev: observe print mode;
authorwenzelm
Wed, 13 Dec 2006 15:47:36 +0100
changeset 21825 6f6bf23f4c1e
parent 21824 153fad1e7318
child 21826 b90d927e0a4b
internal_abbrev: observe print mode;
src/Pure/Isar/theory_target.ML
--- a/src/Pure/Isar/theory_target.ML	Wed Dec 13 15:47:34 2006 +0100
+++ b/src/Pure/Isar/theory_target.ML	Wed Dec 13 15:47:36 2006 +0100
@@ -64,9 +64,9 @@
     val mx2 = if is_loc then mx else NoSyn;
   in (mx1, mx2) end;
 
-fun internal_abbrev ((c, mx), t) =
-  LocalTheory.term_syntax (ProofContext.target_abbrev Syntax.internal_mode ((c, mx), t)) #>
-  ProofContext.add_abbrev (#1 Syntax.internal_mode) (c, t) #> snd;
+fun internal_abbrev prmode ((c, mx), t) =
+  LocalTheory.term_syntax (ProofContext.target_abbrev prmode ((c, mx), t)) #>
+  ProofContext.add_abbrev Syntax.internalM (c, t) #> snd;
 
 fun consts is_class is_loc depends decls lthy =
   let
@@ -84,7 +84,7 @@
     val defs = map (apsnd (pair ("", []))) abbrs;
   in
     lthy'
-    |> is_loc ? fold internal_abbrev abbrs
+    |> is_loc ? fold (internal_abbrev Syntax.default_mode) abbrs
     |> LocalDefs.add_defs defs |>> map (apsnd snd)
   end;
 
@@ -114,7 +114,7 @@
   in
     lthy1
     |> LocalTheory.theory (Sign.add_notation prmode [(lhs, mx1)])
-    |> is_loc ? internal_abbrev ((c, mx2), Term.list_comb (Const (full_c, U), xs))
+    |> is_loc ? internal_abbrev prmode ((c, mx2), Term.list_comb (Const (full_c, U), xs))
     |> ProofContext.local_abbrev (c, rhs)
   end;