Dynamic types
#
| Unit
| (* | unit | *) |
#
| Bool
| (* | booleans | *) |
#
| Float
| (* | floating-point numbers | *) |
#
| Char
| (* | characters | *) |
#
| String
| (* | strings | *) |
#
| Int of int option
| (* | integer type of a given size (as 31-,32- or 64-bits); Int None is for bigints | *) |
(* | collection of stuff of the same type (stored as lists) | *) | |
(* | collection of stuff of the same type (stored as arrays) | *) | |
(* | Cartesian product | *) | |
(* | record 'R or object 'O type; `RW stands for mutable fields | *) | |
(* | polymorphic `P or normal `N variant type | *) | |
(* | option type | *) | |
(* | recursive type | *) | |
#
| Var of string
| (* | recursive fix-point | *) |
(* | arrow type | *) | |
(* | type variable | *) |
free_vars t
returns all the free variables of type t
.
If t
is unfolded (as it should be when calling type_of_t
,
this call should return an empty list.
Returns the more recent failing sub-type relation tested by (<:)
or is_subtype_of
Exception that may be raised by !of_string