369 fun type_tr' show_sorts (*"TYPE"*) (Type ("itself", [T])) ts = |
369 fun type_tr' show_sorts (*"TYPE"*) (Type ("itself", [T])) ts = |
370 Term.list_comb (Lexicon.const "_TYPE" $ TypeExt.term_of_typ show_sorts T, ts) |
370 Term.list_comb (Lexicon.const "_TYPE" $ TypeExt.term_of_typ show_sorts T, ts) |
371 | type_tr' _ _ _ = raise Match; |
371 | type_tr' _ _ _ = raise Match; |
372 |
372 |
373 |
373 |
|
374 (* type constraints *) |
|
375 |
|
376 fun type_constraint_tr' show_sorts (*"_type_constraint_"*) (Type ("fun", [T, _])) (t :: ts) = |
|
377 Term.list_comb (Lexicon.const SynExt.constrainC $ t $ TypeExt.term_of_typ show_sorts T, ts) |
|
378 | type_constraint_tr' _ _ _ = raise Match; |
|
379 |
|
380 |
374 (* dependent / nondependent quantifiers *) |
381 (* dependent / nondependent quantifiers *) |
375 |
382 |
376 fun variant_abs' (x, T, B) = |
383 fun variant_abs' (x, T, B) = |
377 let val x' = variant (add_term_names (B, [])) x in |
384 let val x' = variant (add_term_names (B, [])) x in |
378 (x', subst_bound (mark_boundT (x', T), B)) |
385 (x', subst_bound (mark_boundT (x', T), B)) |
442 [("_abs", abs_ast_tr'), ("_idts", idtyp_ast_tr' "_idts"), |
449 [("_abs", abs_ast_tr'), ("_idts", idtyp_ast_tr' "_idts"), |
443 ("_pttrns", idtyp_ast_tr' "_pttrns"), ("==>", impl_ast_tr'), |
450 ("_pttrns", idtyp_ast_tr' "_pttrns"), ("==>", impl_ast_tr'), |
444 ("_index", index_ast_tr')]); |
451 ("_index", index_ast_tr')]); |
445 |
452 |
446 val pure_trfunsT = |
453 val pure_trfunsT = |
447 [("_mk_ofclass", mk_ofclass_tr'), ("TYPE", type_tr')]; |
454 [("_mk_ofclass", mk_ofclass_tr'), ("TYPE", type_tr'), |
|
455 ("_type_constraint_", type_constraint_tr')]; |
448 |
456 |
449 fun struct_trfuns structs = |
457 fun struct_trfuns structs = |
450 ([], [("_struct", struct_tr structs)], [], [("_struct", struct_ast_tr' structs)]); |
458 ([], [("_struct", struct_tr structs)], [], [("_struct", struct_ast_tr' structs)]); |
451 |
459 |
452 |
460 |