Types

Type

Type for types. F f(t:Type) ...; f(Arr) ...

Constructors

Type(name:Str, doc:Any)
Create a new type. Do not use directly. Use "type MyType".
Type(t:Str, doc:Any, parent:Type)
Type constructor
Type(t:Str, doc:Any, parents:Arr)
Type constructor

Methods

==(a:Type, b:Type)
Types equality comparison. Implemented as sameness comparison.
inherit(t:Type, parent:Type)
Make t inherit from parent. Do not use directly. Use "type MyType(parent)".
init(e:InstantiatingAbstractType, t:Type)
is(obj:Any, t:Type)
Check whether obj is of type t. Uses same function that is used for matching arguments with method parameters when calling a method.
Pred(t:Type)
Convert a type to a predicate.
Str(t:Type)
String representation of a type
Type(t:Str, doc:Any, parent:Type)
Type constructor
~(something:Any, t:Type)
Match a type. Same as "something is t".