@@ -20,7 +20,7 @@ use crate::{
2020 types:: EdgeKind ,
2121} ;
2222
23- use crate :: extension:: { ExtensionRegistry , ExtensionSet , TO_BE_INFERRED } ;
23+ use crate :: extension:: ExtensionRegistry ;
2424use crate :: types:: { PolyFuncType , Signature , Type , TypeArg , TypeRow } ;
2525
2626use itertools:: Itertools ;
@@ -319,18 +319,14 @@ pub trait Dataflow: Container {
319319 inputs : impl IntoIterator < Item = ( Type , Wire ) > ,
320320 ) -> Result < DFGBuilder < & mut Hugr > , BuildError > {
321321 let ( types, input_wires) : ( Vec < Type > , Vec < Wire > ) = inputs. into_iter ( ) . unzip ( ) ;
322- self . dfg_builder (
323- Signature :: new_endo ( types) . with_extension_delta ( TO_BE_INFERRED ) ,
324- input_wires,
325- )
322+ self . dfg_builder ( Signature :: new_endo ( types) , input_wires)
326323 }
327324
328325 /// Return a builder for a [`crate::ops::CFG`] node,
329326 /// i.e. a nested controlflow subgraph.
330327 /// The `inputs` must be an iterable over pairs of the type of the input and
331328 /// the corresponding wire.
332329 /// The `output_types` are the types of the outputs.
333- /// The Extension delta will be inferred.
334330 ///
335331 /// # Errors
336332 ///
@@ -340,27 +336,6 @@ pub trait Dataflow: Container {
340336 & mut self ,
341337 inputs : impl IntoIterator < Item = ( Type , Wire ) > ,
342338 output_types : TypeRow ,
343- ) -> Result < CFGBuilder < & mut Hugr > , BuildError > {
344- self . cfg_builder_exts ( inputs, output_types, TO_BE_INFERRED )
345- }
346-
347- /// Return a builder for a [`crate::ops::CFG`] node,
348- /// i.e. a nested controlflow subgraph.
349- /// The `inputs` must be an iterable over pairs of the type of the input and
350- /// the corresponding wire.
351- /// The `output_types` are the types of the outputs.
352- /// `extension_delta` is explicitly specified. Alternatively
353- /// [cfg_builder](Self::cfg_builder) may be used to infer it.
354- ///
355- /// # Errors
356- ///
357- /// This function will return an error if there is an error when building
358- /// the CFG node.
359- fn cfg_builder_exts (
360- & mut self ,
361- inputs : impl IntoIterator < Item = ( Type , Wire ) > ,
362- output_types : TypeRow ,
363- extension_delta : impl Into < ExtensionSet > ,
364339 ) -> Result < CFGBuilder < & mut Hugr > , BuildError > {
365340 let ( input_types, input_wires) : ( Vec < Type > , Vec < Wire > ) = inputs. into_iter ( ) . unzip ( ) ;
366341
@@ -369,8 +344,7 @@ pub trait Dataflow: Container {
369344 let ( cfg_node, _) = add_node_with_wires (
370345 self ,
371346 ops:: CFG {
372- signature : Signature :: new ( inputs. clone ( ) , output_types. clone ( ) )
373- . with_extension_delta ( extension_delta) ,
347+ signature : Signature :: new ( inputs. clone ( ) , output_types. clone ( ) ) ,
374348 } ,
375349 input_wires,
376350 ) ?;
@@ -449,7 +423,6 @@ pub trait Dataflow: Container {
449423 /// The `inputs` must be an iterable over pairs of the type of the input and
450424 /// the corresponding wire.
451425 /// The `output_types` are the types of the outputs.
452- /// The extension delta will be inferred.
453426 ///
454427 /// # Errors
455428 ///
@@ -461,27 +434,6 @@ pub trait Dataflow: Container {
461434 just_inputs : impl IntoIterator < Item = ( Type , Wire ) > ,
462435 inputs_outputs : impl IntoIterator < Item = ( Type , Wire ) > ,
463436 just_out_types : TypeRow ,
464- ) -> Result < TailLoopBuilder < & mut Hugr > , BuildError > {
465- self . tail_loop_builder_exts ( just_inputs, inputs_outputs, just_out_types, TO_BE_INFERRED )
466- }
467-
468- /// Return a builder for a [`crate::ops::TailLoop`] node.
469- /// The `inputs` must be an iterable over pairs of the type of the input and
470- /// the corresponding wire.
471- /// The `output_types` are the types of the outputs.
472- /// `extension_delta` explicitly specified. Alternatively
473- /// [tail_loop_builder](Self::tail_loop_builder) may be used to infer it.
474- ///
475- /// # Errors
476- ///
477- /// This function will return an error if there is an error when building
478- /// the [`ops::TailLoop`] node.
479- fn tail_loop_builder_exts (
480- & mut self ,
481- just_inputs : impl IntoIterator < Item = ( Type , Wire ) > ,
482- inputs_outputs : impl IntoIterator < Item = ( Type , Wire ) > ,
483- just_out_types : TypeRow ,
484- extension_delta : impl Into < ExtensionSet > ,
485437 ) -> Result < TailLoopBuilder < & mut Hugr > , BuildError > {
486438 let ( input_types, mut input_wires) : ( Vec < Type > , Vec < Wire > ) =
487439 just_inputs. into_iter ( ) . unzip ( ) ;
@@ -493,7 +445,6 @@ pub trait Dataflow: Container {
493445 just_inputs : input_types. into ( ) ,
494446 just_outputs : just_out_types,
495447 rest : rest_types. into ( ) ,
496- extension_delta : extension_delta. into ( ) ,
497448 } ;
498449 // TODO: Make input extensions a parameter
499450 let ( loop_node, _) = add_node_with_wires ( self , tail_loop. clone ( ) , input_wires) ?;
@@ -507,41 +458,17 @@ pub trait Dataflow: Container {
507458 ///
508459 /// The `other_inputs` must be an iterable over pairs of the type of the input and
509460 /// the corresponding wire.
510- /// The `output_types` are the types of the outputs. Extension delta will be inferred.
511- ///
512- /// # Errors
513- ///
514- /// This function will return an error if there is an error when building
515- /// the Conditional node.
516- fn conditional_builder (
517- & mut self ,
518- sum_input : ( impl IntoIterator < Item = TypeRow > , Wire ) ,
519- other_inputs : impl IntoIterator < Item = ( Type , Wire ) > ,
520- output_types : TypeRow ,
521- ) -> Result < ConditionalBuilder < & mut Hugr > , BuildError > {
522- self . conditional_builder_exts ( sum_input, other_inputs, output_types, TO_BE_INFERRED )
523- }
524-
525- /// Return a builder for a [`crate::ops::Conditional`] node.
526- /// `sum_rows` and `sum_wire` define the type of the Sum
527- /// variants and the wire carrying the Sum respectively.
528- ///
529- /// The `other_inputs` must be an iterable over pairs of the type of the input and
530- /// the corresponding wire.
531461 /// The `output_types` are the types of the outputs.
532- /// `extension_delta` is explicitly specified. Alternatively
533- /// [conditional_builder](Self::conditional_builder) may be used to infer it.
534462 ///
535463 /// # Errors
536464 ///
537465 /// This function will return an error if there is an error when building
538466 /// the Conditional node.
539- fn conditional_builder_exts (
467+ fn conditional_builder (
540468 & mut self ,
541469 ( sum_rows, sum_wire) : ( impl IntoIterator < Item = TypeRow > , Wire ) ,
542470 other_inputs : impl IntoIterator < Item = ( Type , Wire ) > ,
543471 output_types : TypeRow ,
544- extension_delta : impl Into < ExtensionSet > ,
545472 ) -> Result < ConditionalBuilder < & mut Hugr > , BuildError > {
546473 let mut input_wires = vec ! [ sum_wire] ;
547474 let ( input_types, rest_input_wires) : ( Vec < Type > , Vec < Wire > ) =
@@ -558,7 +485,6 @@ pub trait Dataflow: Container {
558485 sum_rows,
559486 other_inputs : inputs,
560487 outputs : output_types,
561- extension_delta : extension_delta. into ( ) ,
562488 } ,
563489 input_wires,
564490 ) ?;
0 commit comments