]> Repositorios git - scryer-prolog.git/commitdiff
correct number_chars (#2976)
authorMark Thom <[email protected]>
Tue, 1 Jul 2025 22:47:26 +0000 (15:47 -0700)
committerMark Thom <[email protected]>
Tue, 8 Jul 2025 05:44:05 +0000 (22:44 -0700)
src/machine/system_calls.rs

index 247353258e48d629859bb9a372296d086b45ac11..d301a85a764abd17fe5e512290e171ab30a06134 100644 (file)
@@ -1002,8 +1002,17 @@ impl MachineState {
                             let err = self.syntax_error(err);
                             return Err(self.error_form(err, stub_gen()));
                         }
-                        Ok(Term::Literal(_, cell)) => {
-                            unify!(self, nx, HeapCellValue::from(cell));
+                        Ok(Term::Literal(_, Literal::Rational(n))) => {
+                            self.unify_rational(n, nx);
+                        }
+                        Ok(Term::Literal(_, Literal::F64Offset(n))) => {
+                            self.unify_f64(n, nx);
+                        }
+                        Ok(Term::Literal(_, Literal::Integer(n))) => {
+                            self.unify_big_int(n, nx);
+                        }
+                        Ok(Term::Literal(_, Literal::Fixnum(n))) => {
+                            self.unify_fixnum(n, nx);
                         }
                         _ => {
                             let err = ParserError::ParseBigInt(0, 0);