Added support for multiple sorts in shortened type variables.

This commit is contained in:
Michael Herzberg 2019-07-25 16:27:10 +01:00
parent e04b656f02
commit ac0fa734e4
1 changed files with 4 additions and 5 deletions

View File

@ -276,8 +276,7 @@ structure Hide_Tvar : HIDE_TVAR = struct
val thy = Proof_Context.theory_of ctx
fun parse_ast ((Ast.Constant const)::[]) = (const,NONE)
| parse_ast ((Ast.Constant sort)::(Ast.Constant const)::[])
= (const,SOME sort)
| parse_ast (sort::(Ast.Constant const)::[]) = (const,SOME sort)
| parse_ast _ = error("AST type not supported.")
val (decorated_name, decorated_sort) = parse_ast ast
@ -297,7 +296,7 @@ structure Hide_Tvar : HIDE_TVAR = struct
NONE => Ast.Variable(name_of_tvar n)
| SOME sort => Ast.Appl([Ast.Constant("_ofsort"),
Ast.Variable(name_of_tvar n),
Ast.Constant(sort)])
sort])
in
map mk_tvar (#tvars default_info)
end