src/Pure/type.ML
changeset 42358 b47d41d9f4b5
parent 41421 2db1d3d2ed54
child 42375 774df7c59508
equal deleted inserted replaced
42357:3305f573294e 42358:b47d41d9f4b5
    26     log_types: string list}
    26     log_types: string list}
    27   val empty_tsig: tsig
    27   val empty_tsig: tsig
    28   val class_space: tsig -> Name_Space.T
    28   val class_space: tsig -> Name_Space.T
    29   val class_alias: Name_Space.naming -> binding -> string -> tsig -> tsig
    29   val class_alias: Name_Space.naming -> binding -> string -> tsig -> tsig
    30   val intern_class: tsig -> xstring -> string
    30   val intern_class: tsig -> xstring -> string
    31   val extern_class: tsig -> string -> xstring
    31   val extern_class: Proof.context -> tsig -> string -> xstring
    32   val defaultS: tsig -> sort
    32   val defaultS: tsig -> sort
    33   val logical_types: tsig -> string list
    33   val logical_types: tsig -> string list
    34   val eq_sort: tsig -> sort * sort -> bool
    34   val eq_sort: tsig -> sort * sort -> bool
    35   val subsort: tsig -> sort * sort -> bool
    35   val subsort: tsig -> sort * sort -> bool
    36   val of_sort: tsig -> typ * sort -> bool
    36   val of_sort: tsig -> typ * sort -> bool
    47   val set_mode: mode -> Proof.context -> Proof.context
    47   val set_mode: mode -> Proof.context -> Proof.context
    48   val restore_mode: Proof.context -> Proof.context -> Proof.context
    48   val restore_mode: Proof.context -> Proof.context -> Proof.context
    49   val type_space: tsig -> Name_Space.T
    49   val type_space: tsig -> Name_Space.T
    50   val type_alias: Name_Space.naming -> binding -> string -> tsig -> tsig
    50   val type_alias: Name_Space.naming -> binding -> string -> tsig -> tsig
    51   val intern_type: tsig -> xstring -> string
    51   val intern_type: tsig -> xstring -> string
    52   val extern_type: tsig -> string -> xstring
    52   val extern_type: Proof.context -> tsig -> string -> xstring
    53   val is_logtype: tsig -> string -> bool
    53   val is_logtype: tsig -> string -> bool
    54   val the_decl: tsig -> string -> decl
    54   val the_decl: tsig -> string -> decl
    55   val cert_typ_mode: mode -> tsig -> typ -> typ
    55   val cert_typ_mode: mode -> tsig -> typ -> typ
    56   val cert_typ: tsig -> typ -> typ
    56   val cert_typ: tsig -> typ -> typ
    57   val arity_number: tsig -> string -> int
    57   val arity_number: tsig -> string -> int
   190 
   190 
   191 fun class_alias naming binding name = map_tsig (fn ((space, classes), default, types) =>
   191 fun class_alias naming binding name = map_tsig (fn ((space, classes), default, types) =>
   192   ((Name_Space.alias naming binding name space, classes), default, types));
   192   ((Name_Space.alias naming binding name space, classes), default, types));
   193 
   193 
   194 val intern_class = Name_Space.intern o class_space;
   194 val intern_class = Name_Space.intern o class_space;
   195 val extern_class = Name_Space.extern o class_space;
   195 fun extern_class ctxt = Name_Space.extern ctxt o class_space;
   196 
   196 
   197 fun defaultS (TSig {default, ...}) = default;
   197 fun defaultS (TSig {default, ...}) = default;
   198 fun logical_types (TSig {log_types, ...}) = log_types;
   198 fun logical_types (TSig {log_types, ...}) = log_types;
   199 
   199 
   200 fun eq_sort (TSig {classes, ...}) = Sorts.sort_eq (#2 classes);
   200 fun eq_sort (TSig {classes, ...}) = Sorts.sort_eq (#2 classes);
   235 
   235 
   236 fun type_alias naming binding name = map_tsig (fn (classes, default, (space, types)) =>
   236 fun type_alias naming binding name = map_tsig (fn (classes, default, (space, types)) =>
   237   (classes, default, (Name_Space.alias naming binding name space, types)));
   237   (classes, default, (Name_Space.alias naming binding name space, types)));
   238 
   238 
   239 val intern_type = Name_Space.intern o type_space;
   239 val intern_type = Name_Space.intern o type_space;
   240 val extern_type = Name_Space.extern o type_space;
   240 fun extern_type ctxt = Name_Space.extern ctxt o type_space;
   241 
   241 
   242 val is_logtype = member (op =) o logical_types;
   242 val is_logtype = member (op =) o logical_types;
   243 
   243 
   244 
   244 
   245 fun undecl_type c = "Undeclared type constructor: " ^ quote c;
   245 fun undecl_type c = "Undeclared type constructor: " ^ quote c;