Parse.type_abbrev : string * hol_type -> unit
Abbreviations work at the level of the names of type operators. It is thus possible to link a binary infix to an operator that is in turn an abbreviation.
- type_abbrev ("set", ``:'a -> bool``); > val it = () : unit - ``:num set``; > val it = ``:num set`` : hol_type
- type_abbrev ("rfunc", ``:'b -> 'a``); > val it = () : unit - add_infix_type {Assoc = RIGHT, Name = "rfunc", ParseName = SOME "<-", Prec = 50}; > val it = () : unit - ``:'a <- bool``; > val it = ``:'a <- bool`` : hol_type - dest_thy_type it; > val it = {Args = [``:bool``, ``:'a``], Thy = "min", Tyop = "fun"} : {Args : hol_type list, Thy : string, Tyop : string}