Skip to content

Commit

Permalink
Improve doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec committed May 10, 2024
1 parent adedf15 commit 47a2511
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hugr/src/extension/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,16 @@ pub fn array_type(size: impl Into<TypeArg>, element_ty: Type) -> Type {

/// Name of the operation in the prelude for creating new arrays.
pub const NEW_ARRAY_OP_ID: OpName = OpName::new_inline("new_array");

/// Name of the prelude panic operation.
///
/// This operation can have any input and any output wires; it is instantiated
/// with two [TypeArg::Sequence]s representing these. The first input to the
/// operation is always an error type; the remaining inputs correspond to the
/// first sequence of types in its instantiation; the outputs correspond to the
/// second sequence of types in its instantiation. Note that the inputs and
/// outputs only exist so that structural constraints such as linearity can be
/// satisfied.
pub const PANIC_OP_ID: OpName = OpName::new_inline("panic");

/// Initialize a new array op of element type `element_ty` of length `size`
Expand Down

0 comments on commit 47a2511

Please sign in to comment.