types

types#

Python representations of Tierkreis types, and utilities to convert to and from known python types.

Classes

BoolType

Boolean.

Constraint

A Tierkreis type constraint.

FloatType

IEEE 754 double precision floating point number.

GraphType

A higher order graph type.

IntType

Signed integer.

Kind

Type kind base class.

LacksConstraint

Constraint that a row lacks a particular label.

MapType

A map from keys of one type to values of another.

PairType

A pair of two types.

PartitionConstraint

A type is constrained to be a union of two other types.

Row

A row of fields, each with a label and a type.

RowKind

Used to denote row variables.

SerializeAs

Methods implemented by Tierkreis-compatible types used as alternatives to Base

StarKind

Used to denote individual types.

StringType

UTF-8 encoded string.

StructType

A composite structure of named fields.

TierkreisPair

A pair of values that can be converted to/from a Tierkreis Pair type.

TierkreisType

Abstract base class for all Tierkreis types.

TupleLabel

Generate and parse struct field labels for tuple members.

TypeScheme

A polymorphic type scheme, defined by a TierkreisType body, outer type variables, and constraints.

UnionTag

Utility to generate tags for Union types, to convert them to VariantType.

UnpackRow

Base class to tag dataclasses with to indicate they should be unpacked in to a row.

VarType

Named type variable.

VariantType

A discriminated union type with named variants.

VecType

A vector of elements of the same type.

Exceptions

IncompatiblePyType(type_)

Python type cannot be converted to a Tierkreis type.

IncompatibleUnionType(type_)

Unable to convert Union annotation.