@@ -316,12 +316,6 @@ impl UnificationContext {
316316 m_output,
317317 node_type. op_signature ( ) . extension_reqs ,
318318 ) ;
319- if matches ! (
320- node_type. tag( ) ,
321- OpTag :: Alias | OpTag :: Function | OpTag :: FuncDefn
322- ) {
323- self . add_solution ( m_input, ExtensionSet :: new ( ) ) ;
324- }
325319 }
326320 // We have a solution for everything!
327321 Some ( sig) => {
@@ -723,7 +717,7 @@ mod test {
723717 signature : main_sig,
724718 } ;
725719
726- let root_node = NodeType :: open_extensions ( op) ;
720+ let root_node = NodeType :: new_open ( op) ;
727721 let mut hugr = Hugr :: new ( root_node) ;
728722
729723 let input = ops:: Input :: new ( type_row ! [ NAT , NAT ] ) ;
@@ -833,21 +827,21 @@ mod test {
833827 // This generates a solution that causes validation to fail
834828 // because of a missing lift node
835829 fn missing_lift_node ( ) -> Result < ( ) , Box < dyn Error > > {
836- let mut hugr = Hugr :: new ( NodeType :: pure ( ops:: DFG {
830+ let mut hugr = Hugr :: new ( NodeType :: new_pure ( ops:: DFG {
837831 signature : FunctionType :: new ( type_row ! [ NAT ] , type_row ! [ NAT ] )
838832 . with_extension_delta ( & ExtensionSet :: singleton ( & A ) ) ,
839833 } ) ) ;
840834
841835 let input = hugr. add_node_with_parent (
842836 hugr. root ( ) ,
843- NodeType :: pure ( ops:: Input {
837+ NodeType :: new_pure ( ops:: Input {
844838 types : type_row ! [ NAT ] ,
845839 } ) ,
846840 ) ?;
847841
848842 let output = hugr. add_node_with_parent (
849843 hugr. root ( ) ,
850- NodeType :: pure ( ops:: Output {
844+ NodeType :: new_pure ( ops:: Output {
851845 types : type_row ! [ NAT ] ,
852846 } ) ,
853847 ) ?;
@@ -1049,7 +1043,7 @@ mod test {
10491043 extension_delta : rs. clone ( ) ,
10501044 } ;
10511045
1052- let mut hugr = Hugr :: new ( NodeType :: pure ( op) ) ;
1046+ let mut hugr = Hugr :: new ( NodeType :: new_pure ( op) ) ;
10531047 let conditional_node = hugr. root ( ) ;
10541048
10551049 let case_op = ops:: Case {
@@ -1084,7 +1078,7 @@ mod test {
10841078 fn extension_adding_sequence ( ) -> Result < ( ) , Box < dyn Error > > {
10851079 let df_sig = FunctionType :: new ( type_row ! [ NAT ] , type_row ! [ NAT ] ) ;
10861080
1087- let mut hugr = Hugr :: new ( NodeType :: open_extensions ( ops:: DFG {
1081+ let mut hugr = Hugr :: new ( NodeType :: new_open ( ops:: DFG {
10881082 signature : df_sig
10891083 . clone ( )
10901084 . with_extension_delta ( & ExtensionSet :: from_iter ( [ A , B ] ) ) ,
@@ -1255,7 +1249,7 @@ mod test {
12551249 let b = ExtensionSet :: singleton ( & B ) ;
12561250 let c = ExtensionSet :: singleton ( & C ) ;
12571251
1258- let mut hugr = Hugr :: new ( NodeType :: open_extensions ( ops:: CFG {
1252+ let mut hugr = Hugr :: new ( NodeType :: new_open ( ops:: CFG {
12591253 signature : FunctionType :: new ( type_row ! [ NAT ] , type_row ! [ NAT ] ) . with_extension_delta ( & abc) ,
12601254 } ) ) ;
12611255
@@ -1353,7 +1347,7 @@ mod test {
13531347 /// +--------------------+
13541348 #[ test]
13551349 fn multi_entry ( ) -> Result < ( ) , Box < dyn Error > > {
1356- let mut hugr = Hugr :: new ( NodeType :: open_extensions ( ops:: CFG {
1350+ let mut hugr = Hugr :: new ( NodeType :: new_open ( ops:: CFG {
13571351 signature : FunctionType :: new ( type_row ! [ NAT ] , type_row ! [ NAT ] ) , // maybe add extensions?
13581352 } ) ) ;
13591353 let cfg = hugr. root ( ) ;
@@ -1436,7 +1430,7 @@ mod test {
14361430 ) -> Result < Hugr , Box < dyn Error > > {
14371431 let hugr_delta = entry_ext. clone ( ) . union ( & bb1_ext) . union ( & bb2_ext) ;
14381432
1439- let mut hugr = Hugr :: new ( NodeType :: open_extensions ( ops:: CFG {
1433+ let mut hugr = Hugr :: new ( NodeType :: new_open ( ops:: CFG {
14401434 signature : FunctionType :: new ( type_row ! [ NAT ] , type_row ! [ NAT ] )
14411435 . with_extension_delta ( & hugr_delta) ,
14421436 } ) ) ;
0 commit comments