@@ -151,7 +151,7 @@ impl BinaryOp for Arithmetic {
151151 output. op ( core_op) ;
152152 }
153153
154- ( Type :: Unit ( _name1, a_type) , Type :: Unit ( _name2, b_type) ) => {
154+ ( Type :: Nominal ( _name1, a_type) , Type :: Nominal ( _name2, b_type) ) => {
155155 return self . compile_types ( a_type, b_type, env, output) ;
156156 }
157157
@@ -182,7 +182,7 @@ impl BinaryOp for Arithmetic {
182182
183183 ( Type :: Int | Type :: Float | Type :: Cell , Type :: Cell )
184184 | ( Type :: Cell , Type :: Int | Type :: Float ) => Ok ( true ) ,
185- ( Type :: Unit ( name1, a_type) , Type :: Unit ( name2, b_type) ) => {
185+ ( Type :: Nominal ( name1, a_type) , Type :: Nominal ( name2, b_type) ) => {
186186 // Make sure that the two units are the same.
187187 if name1 != name2 {
188188 return Ok ( false ) ;
@@ -261,7 +261,7 @@ impl BinaryOp for Arithmetic {
261261 // ));
262262 // }
263263 // }
264- ( Type :: Unit ( name1, a_type) , Type :: Unit ( name2, b_type) ) => {
264+ ( Type :: Nominal ( name1, a_type) , Type :: Nominal ( name2, b_type) ) => {
265265 // Make sure that the two units are the same.
266266 if name1 != name2 {
267267 error ! ( "{name1} is not {name2}" ) ;
@@ -282,7 +282,7 @@ impl BinaryOp for Arithmetic {
282282 ) ) ;
283283 }
284284
285- Type :: Unit ( name1, a_type)
285+ Type :: Nominal ( name1, a_type)
286286 }
287287 ( a, b) => {
288288 error ! ( "Unhandled case {a} {self} {b}" ) ;
0 commit comments