src/Pure/General/symbol.ML
changeset 6692 05c56f41e661
parent 6640 d2e8342bf5c3
child 6857 6e6eb8d92377
equal deleted inserted replaced
6691:8a1b5f9d8420 6692:05c56f41e661
    27   val source: bool -> (string, 'a) Source.source ->
    27   val source: bool -> (string, 'a) Source.source ->
    28     (symbol, (string, 'a) Source.source) Source.source
    28     (symbol, (string, 'a) Source.source) Source.source
    29   val explode: string -> symbol list
    29   val explode: string -> symbol list
    30   val input: string -> string
    30   val input: string -> string
    31   val add_mode: string -> (string -> string * real) -> unit
    31   val add_mode: string -> (string -> string * real) -> unit
       
    32   val isabelle_fontN: string
       
    33   val symbolsN: string
       
    34   val xsymbolsN: string
    32   val output: string -> string
    35   val output: string -> string
    33   val output_width: string -> string * real
    36   val output_width: string -> string * real
    34 end;
    37 end;
    35 
    38 
    36 structure Symbol: SYMBOL =
    39 structure Symbol: SYMBOL =
   307   in (implode (map char cs), real (sym_length cs)) end;
   310   in (implode (map char cs), real (sym_length cs)) end;
   308 
   311 
   309 
   312 
   310 (* maintain modes *)
   313 (* maintain modes *)
   311 
   314 
   312 val modes = ref (Symtab.make [("isabelle_font", isabelle_font_output)]);
   315 val isabelle_fontN = "isabelle_font";
       
   316 val symbolsN = "symbols";
       
   317 val xsymbolsN = "xsymbols";
       
   318 
       
   319 val modes = ref (Symtab.make [(isabelle_fontN, isabelle_font_output)]);
   313 
   320 
   314 fun lookup_mode name = Symtab.lookup (! modes, name);
   321 fun lookup_mode name = Symtab.lookup (! modes, name);
   315 
   322 
   316 fun add_mode name f =
   323 fun add_mode name f =
   317  (if is_none (lookup_mode name) then ()
   324  (if is_none (lookup_mode name) then ()