src/Tools/Code/code_target.ML
changeset 39142 f63715f00fdd
parent 39102 4ae1d212100f
child 39480 a2ed61449dcc
equal deleted inserted replaced
39141:5ec8e4404c33 39142:f63715f00fdd
   103        Symreltab.join (K snd) (instance1, instance2)),
   103        Symreltab.join (K snd) (instance1, instance2)),
   104     (Symtab.join (K snd) (tyco1, tyco2),
   104     (Symtab.join (K snd) (tyco1, tyco2),
   105        Symtab.join (K snd) (const1, const2))
   105        Symtab.join (K snd) (const1, const2))
   106   );
   106   );
   107 
   107 
   108 type serializer = Token.T list (*arguments*) -> {
   108 type serializer = Token.T list
       
   109   -> {
   109     labelled_name: string -> string,
   110     labelled_name: string -> string,
   110     reserved_syms: string list,
   111     reserved_syms: string list,
   111     includes: (string * Pretty.T) list,
   112     includes: (string * Pretty.T) list,
   112     module_alias: string -> string option,
   113     module_alias: string -> string option,
   113     class_syntax: string -> string option,
   114     class_syntax: string -> string option,
   114     tyco_syntax: string -> Code_Printer.tyco_syntax option,
   115     tyco_syntax: string -> Code_Printer.tyco_syntax option,
   115     const_syntax: string -> Code_Printer.activated_const_syntax option,
   116     const_syntax: string -> Code_Printer.activated_const_syntax option,
   116     program: Code_Thingol.program,
   117     program: Code_Thingol.program }
   117     names: string list }
       
   118   -> serialization;
   118   -> serialization;
   119 
   119 
   120 datatype description = Fundamental of { serializer: serializer,
   120 datatype description = Fundamental of { serializer: serializer,
   121       literals: literals,
   121       literals: literals,
   122       check: { env_var: string, make_destination: Path.T -> Path.T,
   122       check: { env_var: string, make_destination: Path.T -> Path.T,
   319       includes = includes,
   319       includes = includes,
   320       module_alias = if module_name = "" then Symtab.lookup module_alias else K (SOME module_name),
   320       module_alias = if module_name = "" then Symtab.lookup module_alias else K (SOME module_name),
   321       class_syntax = Symtab.lookup class_syntax,
   321       class_syntax = Symtab.lookup class_syntax,
   322       tyco_syntax = Symtab.lookup tyco_syntax,
   322       tyco_syntax = Symtab.lookup tyco_syntax,
   323       const_syntax = Symtab.lookup const_syntax,
   323       const_syntax = Symtab.lookup const_syntax,
   324       program = program,
   324       program = program }
   325       names = names }
       
   326   end;
   325   end;
   327 
   326 
   328 fun mount_serializer thy target some_width module_name args naming proto_program names =
   327 fun mount_serializer thy target some_width module_name args naming proto_program names =
   329   let
   328   let
   330     val (default_width, abortable, data, program) =
   329     val (default_width, abortable, data, program) =