module type
Type definitions (type.Type and implementations).
index
tables
class type
-
type:eq(a, b)
– check two values of this type for equality. -
type:get(key)
– index into this type or throw a error. -
type:mk_sig(init)
– create a SigStream of this type. -
type:mk_evt()
– create a EvtStream of this type. -
type:mk_const(val)
– create a Constant of this type.
class primitive
-
Primitive(name)
– instantiate a Primitive type. -
primitive.name
– the type’s unique name.
class struct
-
struct:iter_keys()
– iterate over contained keys and types each iteration, returns a key and associated type -
struct:project(keys)
– create a new struct type with a subset of keys. -
Struct(types)
– instantiate a Primitive type. -
struct.types
– the shape and field types of the struct.
class array
-
array:iter_keys()
– iterate over contained types each iteration, returns a key and associated type -
Array(size, type)
– instantiate an Array type. -
array.size
– the number of elements in this array. -
array.type
– the element type of this array.
details
tables
-
– Magic table containing all Primitive types.
When indexed with a string returns a (cached) instance of that type.
class type
-
– check two values of this type for equality.
parameters:
returns:
- (bool)
- – index into this type or throw a error.
- – create a SigStream of this type.
-
– create a EvtStream of this type.
returns:
- – create a Constant of this type.
class primitive
-
– instantiate a Primitive type.
parameters:
- the typename
-
– the type’s unique name.
class struct
- – iterate over contained keys and types each iteration, returns a key and associated type
-
– create a new struct type with a subset of keys.
parameters:
-
– instantiate a Primitive type.
parameters:
-
– the shape and field types of the struct.
class array
-
– iterate over contained types
each iteration, returns a key and associated type
returns:
- (number): key
- (Type): associated type
-
– instantiate an Array type.
parameters:
-
– the number of elements in this array.
-
– the element type of this array.