File: is_type.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 (30 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (3)
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
\DOC is_type

\TYPE {is_type : hol_type -> bool}

\SYNOPSIS
Tests whether a type is an instance of a type constructor.

\DESCRIBE
{is_type ty} returns {true} if {ty} is a base type or constructed by an outer
type constructor, and {false} if it is a type variable.

\FAILURE
Never fails.

\EXAMPLE
{
  # is_type `:bool`;;
  val it : bool = true

  # is_type `:bool->int`;;
  val it : bool = true

  # is_type `:Tyvar`;;
  val it : bool = false
}

\SEEALSO
get_type_arity, is_vartype.

\ENDDOC