tys

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.

Array

Prelude fixed size array of ty elements.

BoundedNatArg

A type argument for a BoundedNatParam.

BoundedNatParam

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

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.

ExtensionsArg

Type argument for an ExtensionsParam.

ExtensionsParam

An extension set parameter.

FunctionKind

Statically defined function edges.

FunctionType

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

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.

SequenceArg

Sequence of type arguments, for a ListParam or TupleParam.

StringArg

A utf-8 encoded string type argument.

StringParam

String type parameter.

Sum

Algebraic sum-over-product type.

Tuple

Product type with tys elements.

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.