@@ -4,8 +4,13 @@ use anyhow::{anyhow, Result};
4
4
use hugr_core:: builder:: {
5
5
BuildHandle , Container , DFGWrapper , HugrBuilder , ModuleBuilder , SubContainer ,
6
6
} ;
7
- use hugr_core:: extension:: { ExtensionRegistry , EMPTY_REG } ;
7
+ use hugr_core:: extension:: prelude:: PRELUDE_ID ;
8
+ use hugr_core:: extension:: { ExtensionRegistry , ExtensionSet , EMPTY_REG } ;
8
9
use hugr_core:: ops:: handle:: FuncID ;
10
+ use hugr_core:: std_extensions:: arithmetic:: {
11
+ conversions, float_ops, float_types, int_ops, int_types,
12
+ } ;
13
+ use hugr_core:: std_extensions:: logic;
9
14
use hugr_core:: types:: TypeRow ;
10
15
use hugr_core:: { Hugr , HugrView } ;
11
16
use inkwell:: module:: Module ;
@@ -137,7 +142,20 @@ impl SimpleHugrConfig {
137
142
) -> Hugr {
138
143
let mut mod_b = ModuleBuilder :: new ( ) ;
139
144
let func_b = mod_b
140
- . define_function ( "main" , HugrFuncType :: new ( self . ins , self . outs ) )
145
+ . define_function (
146
+ "main" ,
147
+ HugrFuncType :: new ( self . ins , self . outs ) . with_extension_delta (
148
+ ExtensionSet :: from_iter ( [
149
+ PRELUDE_ID ,
150
+ int_types:: EXTENSION_ID ,
151
+ int_ops:: EXTENSION_ID ,
152
+ float_types:: EXTENSION_ID ,
153
+ float_ops:: EXTENSION_ID ,
154
+ conversions:: EXTENSION_ID ,
155
+ logic:: EXTENSION_ID ,
156
+ ] ) ,
157
+ ) ,
158
+ )
141
159
. unwrap ( ) ;
142
160
make ( func_b, & self . extensions ) ;
143
161
0 commit comments