File: mk_type.doc

package info (click to toggle)
hol-light 20190729-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 42,676 kB
  • sloc: ml: 637,078; cpp: 439; makefile: 301; lisp: 286; java: 279; sh: 239; yacc: 108; perl: 78; ansic: 57; sed: 39; python: 13
file content (32 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (6)
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
28
29
30
31
32
\DOC mk_type

\TYPE {mk_type : string * hol_type list -> hol_type}

\SYNOPSIS
Constructs a type (other than a variable type).

\DESCRIBE
{mk_type("op",[`:ty1`;...;`:tyn`])} returns {`:(ty1,...,tyn)op`} where {op}
is the name of a known {n}-ary type constructor.

\FAILURE
Fails with {mk_type} if the string is not the name of a known type, or if the
type is known but the length of the list of argument types is not equal to
the arity of the type constructor.

\EXAMPLE
{
  # mk_type ("bool",[]);;
  val it : hol_type = `:bool`

  # mk_type ("list",[`:bool`]);;
  val it : hol_type = `:(bool)list`

  # mk_type ("fun",[`:num`;`:bool`]);;
  val it : hol_type = `:num->bool`
}

\SEEALSO
dest_type, mk_vartype.

\ENDDOC