Expand description
Extensions
TODO: YAML declaration and parsing. This should be similar to a plugin
system (outside the types
module), which also parses nested OpDef
s.
Re-exports§
pub use prelude::PRELUDE;
pub use prelude::PRELUDE;
pub use prelude::PRELUDE_REGISTRY;
pub use prelude::PRELUDE_REGISTRY;
Modules§
- Prelude extension - available in all contexts, defining common types, operations and constants.
- A trait that enum for op definitions that gathers up some shared functionality.
Structs§
- Encode a signature as PolyFuncTypeRV but with additional validation of type arguments via a custom binary. The binary cannot be serialized so will be lost over a serialization round-trip.
- A extension is a set of capabilities required to execute a graph.
- Extension Registries store extensions to be looked up e.g. during validation.
- A set of extensions identified by their unique
ExtensionId
. - A constant value provided by a extension. Must be an instance of a type available to the extension.
- Type holding a boxed const-folding function.
- Serializable definition for dynamically loaded operations.
- A declaration of an opaque type. Note this does not provide any way to create instances
- SemVer version as defined by https://semver.org.
Enums§
- An error that can occur in building a new extension.
- An error that can occur in defining an extension registry.
- Different ways that an OpDef can lower operation nodes i.e. provide a Hugr that implements the operation using a set of other extensions.
- An error that can occur in computing the signature of a node. TODO: decide on failure modes
- The ways in which an OpDef may compute the Signature of each operation node.
- The type bound of a
TypeDef
Constants§
- An Extension Registry containing no extensions.
- A special ExtensionId which indicates that the delta of a non-Function container node should be computed by extension inference. See
infer_extensions
which lists the container nodes to which this can be applied.
Traits§
- Trait implemented by extension operations that can perform constant folding.
- Trait necessary for binary computations of OpDef signature
- Compute signature of
OpDef
given type arguments. - Trait for validating type arguments to a PolyFuncTypeRV beyond conformation to declared type parameter (which should have been checked beforehand), given just the arguments.
- Trait for validating type arguments to a PolyFuncTypeRV beyond conformation to declared type parameter (which should have been checked beforehand).
Functions§
- Tag some output constants with
OutgoingPort
inferred from the ordering.
Type Aliases§
- Output of constant folding an operation, None indicates folding was either not possible or unsuccessful. An empty vector indicates folding was successful and no values are output.
- A unique identifier for a extension.