File: type_subst.doc

package info (click to toggle)
hol-light 20230128-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,636 kB
  • sloc: ml: 688,681; cpp: 439; makefile: 302; lisp: 286; java: 279; sh: 251; yacc: 108; perl: 78; ansic: 57; sed: 39; python: 13
file content (27 lines) | stat: -rw-r--r-- 739 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
\DOC type_subst

\TYPE {type_subst : (hol_type * hol_type) list -> hol_type -> hol_type}

\SYNOPSIS
Substitute chosen types for type variables in a type.

\DESCRIBE
The call {type_subst [ty1,tv1; ... ; tyn,tvn] ty} where each {tyi} is a type
and each {tvi} is a type variable, will systematically replace each instance of
{tvi} in the type {ty} by the corresponding type {tyi}.

\FAILURE
Never fails. If some of the {tvi} are not type variables they will be ignored,
and if several {tvi} are the same, the first one in the list will be used to
determine the substitution.

\EXAMPLE
{
  # type_subst [`:num`,`:A`; `:bool`,`:B`] `:A->(B)list->A#B#C`;;
  val it : hol_type = `:num->(bool)list->num#bool#C`
}

\SEEALSO
inst, tysubst.

\ENDDOC