tysΒΆ

HUGR edge kinds, types, type parameters and type arguments.

Module attributes

TypeRow

Row of types.

Qubit

Qubit type.

Bool

Boolean type (UnitSum of size 2).

Unit

Unit type (UnitSum of size 1).

Kind

The kind of a HUGR graph edge.

Functions

get_first_sum

Check the first type in a row of types is a Sum, returning it and the rest.

Classes

Alias

Type alias.

BoundedNatArg

A type argument for a BoundedNatParam.

BoundedNatParam

A type parameter indicating a natural number with an optional upper bound.

BytesArg

A bytes type argument.

BytesParam

Bytes type parameter.

CFKind

Control flow edges.

ConstKind

Static constant value edges.

Either

Two-variant tuple of elements.

ExtType

Extension type, defined by a type definition and type arguments.

FloatArg

A floating point type argument.

FloatParam

Float type parameter.

FunctionKind

Statically defined function edges.

FunctionType

A function type, defined by input types, output types and extension requirements.

ListArg

Sequence of type arguments for a ListParam.

ListParam

Type parameter which requires a list of type arguments.

Opaque

Opaque type, identified by id and with optional type arguments and bound.

Option

Optional tuple of elements.

OrderKind

State order edges.

PolyFuncType

Polymorphic function type or type scheme.

RowVariable

A type variable standing in for a row of types, identified by index.

StringArg

A utf-8 encoded string type argument.

StringParam

String type parameter.

Sum

Algebraic sum-over-product type.

Tuple

Product type with tys elements.

TupleArg

Sequence of type arguments for a TupleParam.

TupleParam

Type parameter which requires a tuple of type arguments.

Type

A HUGR type.

TypeArg

A HUGR type argument, which can be bound to a :class:TypeParam.

TypeParam

A HUGR type parameter.

TypeTypeArg

A type argument for a TypeTypeParam.

TypeTypeParam

A type parameter indicating a type with a given boumd.

USize

The Prelude unsigned size type.

UnitSum

Simple Sum type with size variants of empty rows.

ValueKind

Dataflow value edges.

Variable

A type variable with a given bound, identified by index.

VariableArg

A type argument variable.