tuned signature;
authorwenzelm
Mon, 24 Sep 2018 22:05:25 +0200
changeset 69062 5eda37c06f42
parent 69061 da448868a18a
child 69063 765ff343a7aa
tuned signature;
src/Pure/Isar/locale.ML
src/Pure/morphism.ML
--- a/src/Pure/Isar/locale.ML	Mon Sep 24 20:24:03 2018 +0200
+++ b/src/Pure/Isar/locale.ML	Mon Sep 24 22:05:25 2018 +0200
@@ -259,7 +259,7 @@
   let
     val thy = Proof_Context.theory_of ctxt;
     val morph' = morph $> export;
-    val qs = Binding.name "x" |> Morphism.binding morph' |> Binding.prefix_of;
+    val qs = Morphism.binding_prefix morph';
     val ts = instance_of thy name morph';
   in pretty_reg_inst ctxt qs (name, ts) end;
 
--- a/src/Pure/morphism.ML	Mon Sep 24 20:24:03 2018 +0200
+++ b/src/Pure/morphism.ML	Mon Sep 24 22:05:25 2018 +0200
@@ -24,6 +24,7 @@
     fact: (thm list -> thm list) list} -> morphism
   val pretty: morphism -> Pretty.T
   val binding: morphism -> binding -> binding
+  val binding_prefix: morphism -> (string * bool) list
   val typ: morphism -> typ -> typ
   val term: morphism -> term -> term
   val fact: morphism -> thm list -> thm list
@@ -88,6 +89,7 @@
 val _ = ML_system_pp (fn _ => fn _ => Pretty.to_polyml o pretty);
 
 fun binding (Morphism {binding, ...}) = apply binding;
+fun binding_prefix morph = Binding.name "x" |> binding morph |> Binding.prefix_of;
 fun typ (Morphism {typ, ...}) = apply typ;
 fun term (Morphism {term, ...}) = apply term;
 fun fact (Morphism {fact, ...}) = apply fact;