equal
deleted
inserted
replaced
29 val global_ctyp_of: theory -> typ -> ctyp |
29 val global_ctyp_of: theory -> typ -> ctyp |
30 val ctyp_of: Proof.context -> typ -> ctyp |
30 val ctyp_of: Proof.context -> typ -> ctyp |
31 val dest_ctyp: ctyp -> ctyp list |
31 val dest_ctyp: ctyp -> ctyp list |
32 val dest_ctypN: int -> ctyp -> ctyp |
32 val dest_ctypN: int -> ctyp -> ctyp |
33 val make_ctyp: ctyp -> ctyp list -> ctyp |
33 val make_ctyp: ctyp -> ctyp list -> ctyp |
|
34 val maxidx_of_ctyp: ctyp -> int |
34 (*certified terms*) |
35 (*certified terms*) |
35 val term_of: cterm -> term |
36 val term_of: cterm -> term |
36 val typ_of_cterm: cterm -> typ |
37 val typ_of_cterm: cterm -> typ |
37 val ctyp_of_cterm: cterm -> ctyp |
38 val ctyp_of_cterm: cterm -> ctyp |
38 val maxidx_of_cterm: cterm -> int |
39 val maxidx_of_cterm: cterm -> int |
205 |
206 |
206 datatype ctyp = Ctyp of {cert: Context.certificate, T: typ, maxidx: int, sorts: sort Ord_List.T}; |
207 datatype ctyp = Ctyp of {cert: Context.certificate, T: typ, maxidx: int, sorts: sort Ord_List.T}; |
207 |
208 |
208 fun typ_of (Ctyp {T, ...}) = T; |
209 fun typ_of (Ctyp {T, ...}) = T; |
209 |
210 |
|
211 fun maxidx_of_ctyp (Ctyp {maxidx, ...}) = maxidx; |
|
212 |
210 fun global_ctyp_of thy raw_T = |
213 fun global_ctyp_of thy raw_T = |
211 let |
214 let |
212 val T = Sign.certify_typ thy raw_T; |
215 val T = Sign.certify_typ thy raw_T; |
213 val maxidx = Term.maxidx_of_typ T; |
216 val maxidx = Term.maxidx_of_typ T; |
214 val sorts = Sorts.insert_typ T []; |
217 val sorts = Sorts.insert_typ T []; |