ModulePointer#
- class hugr.package.ModulePointer(package: Package, module_index: int)[source]#
Bases:
PackagePointer
Pointer to a module in a package.
- Parameters:
package – Package pointed to.
module_index – Index of the module in the package.
Methods
Create an executable package from a module containing a main function.
Attributes
Hugr definition of the module.
Index of the module in the package.
Package pointed to.
- to_executable_package() ExecutablePackage [source]#
Create an executable package from a module containing a main function.
- Raises:
ValueError – If the module does not contain a main function.