simplified pretty token metric: type int;
authorwenzelm
Sat, 07 Jul 2007 00:14:56 +0200
changeset 23615 40ab945ef5ff
parent 23614 4724a6b90af4
child 23616 ba6deff7d214
simplified pretty token metric: type int;
src/Pure/Syntax/printer.ML
src/Pure/Syntax/syn_ext.ML
src/Pure/Syntax/syntax.ML
src/Pure/sign.ML
--- a/src/Pure/Syntax/printer.ML	Sat Jul 07 00:14:54 2007 +0200
+++ b/src/Pure/Syntax/printer.ML	Sat Jul 07 00:14:56 2007 +0200
@@ -31,10 +31,10 @@
   val merge_prtabs: prtabs -> prtabs -> prtabs
   val pretty_term_ast: (string -> xstring) -> Proof.context -> bool -> prtabs
     -> (string -> (Proof.context -> Ast.ast list -> Ast.ast) list)
-    -> (string -> (string -> string * real) option) -> Ast.ast -> Pretty.T
+    -> (string -> (string -> string * int) option) -> Ast.ast -> Pretty.T
   val pretty_typ_ast: Proof.context -> bool -> prtabs
     -> (string -> (Proof.context -> Ast.ast list -> Ast.ast) list)
-    -> (string -> (string -> string * real) option) -> Ast.ast -> Pretty.T
+    -> (string -> (string -> string * int) option) -> Ast.ast -> Pretty.T
 end;
 
 structure Printer: PRINTER =
--- a/src/Pure/Syntax/syn_ext.ML	Sat Jul 07 00:14:54 2007 +0200
+++ b/src/Pure/Syntax/syn_ext.ML	Sat Jul 07 00:14:56 2007 +0200
@@ -14,8 +14,8 @@
   val stamp_trfun: stamp -> string * 'a -> string * ('a * stamp)
   val mk_trfun: string * 'a -> string * ('a * stamp)
   val eq_trfun: ('a * stamp) * ('a * stamp) -> bool
-  val tokentrans_mode: string -> (string * (string -> string * real)) list ->
-    (string * string * (string -> string * real)) list
+  val tokentrans_mode: string -> (string * (string -> string * int)) list ->
+    (string * string * (string -> string * int)) list
   val standard_token_classes: string list
 end;
 
@@ -49,7 +49,7 @@
         (string * ((Proof.context -> bool -> typ -> term list -> term) * stamp)) list,
       print_rules: (Ast.ast * Ast.ast) list,
       print_ast_translation: (string * ((Proof.context -> Ast.ast list -> Ast.ast) * stamp)) list,
-      token_translation: (string * string * (string -> string * real)) list}
+      token_translation: (string * string * (string -> string * int)) list}
   val mfix_delims: string -> string list
   val mfix_args: string -> int
   val escape_mfix: string -> string
@@ -59,14 +59,14 @@
     (string * ((Proof.context -> term list -> term) * stamp)) list *
     (string * ((Proof.context -> bool -> typ -> term list -> term) * stamp)) list *
     (string * ((Proof.context -> Ast.ast list -> Ast.ast) * stamp)) list
-    -> (string * string * (string -> string * real)) list
+    -> (string * string * (string -> string * int)) list
     -> (Ast.ast * Ast.ast) list * (Ast.ast * Ast.ast) list -> syn_ext
   val syn_ext: mfix list -> string list ->
     (string * ((Proof.context -> Ast.ast list -> Ast.ast) * stamp)) list *
     (string * ((Proof.context -> term list -> term) * stamp)) list *
     (string * ((Proof.context -> bool -> typ -> term list -> term) * stamp)) list *
     (string * ((Proof.context -> Ast.ast list -> Ast.ast) * stamp)) list
-    -> (string * string * (string -> string * real)) list
+    -> (string * string * (string -> string * int)) list
     -> (Ast.ast * Ast.ast) list * (Ast.ast * Ast.ast) list -> syn_ext
   val syn_ext_const_names: string list -> syn_ext
   val syn_ext_rules: (Ast.ast * Ast.ast) list * (Ast.ast * Ast.ast) list -> syn_ext
@@ -80,7 +80,7 @@
     (string * ((Proof.context -> term list -> term) * stamp)) list *
     (string * ((Proof.context -> bool -> typ -> term list -> term) * stamp)) list *
     (string * ((Proof.context -> Ast.ast list -> Ast.ast) * stamp)) list -> syn_ext
-  val syn_ext_tokentrfuns: (string * string * (string -> string * real)) list -> syn_ext
+  val syn_ext_tokentrfuns: (string * string * (string -> string * int)) list -> syn_ext
   val standard_token_markers: string list
   val pure_ext: syn_ext
 end;
@@ -343,7 +343,7 @@
       (string * ((Proof.context -> bool -> typ -> term list -> term) * stamp)) list,
     print_rules: (Ast.ast * Ast.ast) list,
     print_ast_translation: (string * ((Proof.context -> Ast.ast list -> Ast.ast) * stamp)) list,
-    token_translation: (string * string * (string -> string * real)) list};
+    token_translation: (string * string * (string -> string * int)) list};
 
 
 (* syn_ext *)
--- a/src/Pure/Syntax/syntax.ML	Sat Jul 07 00:14:54 2007 +0200
+++ b/src/Pure/Syntax/syntax.ML	Sat Jul 07 00:14:56 2007 +0200
@@ -55,7 +55,7 @@
     (string * ((Proof.context -> term list -> term) * stamp)) list *
     (string * ((Proof.context -> bool -> typ -> term list -> term) * stamp)) list *
     (string * ((Proof.context -> ast list -> ast) * stamp)) list -> syntax -> syntax
-  val extend_tokentrfuns: (string * string * (string -> string * real)) list -> syntax -> syntax
+  val extend_tokentrfuns: (string * string * (string -> string * int)) list -> syntax -> syntax
   val remove_const_gram: (string -> bool) ->
     mode -> (string * typ * mixfix) list -> syntax -> syntax
   val extend_trrules: Proof.context -> (string -> bool) -> syntax ->
@@ -183,7 +183,7 @@
     print_trtab: ((Proof.context -> bool -> typ -> term list -> term) * stamp) list Symtab.table,
     print_ruletab: ruletab,
     print_ast_trtab: ((Proof.context -> Ast.ast list -> Ast.ast) * stamp) list Symtab.table,
-    tokentrtab: (string * (string * ((string -> string * real) * stamp)) list) list,
+    tokentrtab: (string * (string * ((string -> string * int) * stamp)) list) list,
     prtabs: Printer.prtabs} * stamp;
 
 fun eq_syntax (Syntax (_, s1), Syntax (_, s2)) = s1 = s2;
--- a/src/Pure/sign.ML	Sat Jul 07 00:14:54 2007 +0200
+++ b/src/Pure/sign.ML	Sat Jul 07 00:14:56 2007 +0200
@@ -38,8 +38,8 @@
   val add_advanced_trfunsT:
     (string * (Proof.context -> bool -> typ -> term list -> term)) list -> theory -> theory
   val add_tokentrfuns:
-    (string * string * (string -> string * real)) list -> theory -> theory
-  val add_mode_tokentrfuns: string -> (string * (string -> string * real)) list
+    (string * string * (string -> string * int)) list -> theory -> theory
+  val add_mode_tokentrfuns: string -> (string * (string -> string * int)) list
     -> theory -> theory
   val add_trrules: (xstring * string) Syntax.trrule list -> theory -> theory
   val del_trrules: (xstring * string) Syntax.trrule list -> theory -> theory