Skip to content

Commit

Permalink
Uncomment test, remove legacy comments and pragmas
Browse files Browse the repository at this point in the history
  • Loading branch information
vsbogd committed Nov 8, 2024
1 parent ffaf1e8 commit ac80774
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion lib/src/atom/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ impl Bindings {
self.bindings.remove(from_binding_id);
}

#[allow(dead_code)] //TODO: MINIMAL only silence the warning until interpreter2 replaces interpreter
pub(crate) fn len(&self) -> usize {
self.binding_by_var.len()
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/metta/runner/stdlib_minimal.metta
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
(= (nop) ())
(= (nop $x) ())

; TODO: MINIMAL added for compatibility, remove after migration
; TODO: can be replaced by Empty atom and removed, kept for compatibility
(@doc empty
(@desc "Cuts evaluation of the non-deterministic branch and removes it from the result")
(@params ())
Expand Down
2 changes: 0 additions & 2 deletions lib/src/metta/runner/stdlib_minimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,6 @@ fn atom_to_string(atom: &Atom) -> String {
}
#[derive(Clone, Debug)]
pub struct GetTypeOp {
// TODO: MINIMAL this is temporary compatibility fix to be removed after
// migration to the minimal MeTTa
space: DynSpace,
}

Expand Down
8 changes: 3 additions & 5 deletions python/tests/scripts/b5_types_prelim.metta
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,10 @@
(Cons (S Z) (Cons Z Nil))
((Cons (S Z) (Cons Z Nil))))

; TODO: MINIMAL This test has different behavior in old and new versions of the
; interpreter versions. Uncomment it after migration to the minimal MeTTa.
; This list is badly typed, because S and Z are not the same type
;!(assertEqualToResult
; (Cons S (Cons Z Nil))
; ((Error (Cons Z Nil) BadType)))
!(assertEqualToResult
(Cons S (Cons Z Nil))
((Error (Cons Z Nil) BadType)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down
6 changes: 4 additions & 2 deletions python/tests/scripts/d2_higherfunc.metta
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@
(get-type (fmap (curry-a + 2) (Left "5")))
())
; TODO: Two examples below are type-checked successfully because, (UntypedC "5")
; can return result which has an appropriate type. Uncomment when old_interpreter
; feature is removed.
; can return result which has an appropriate type. But type returned contains
; variable, for instance ($F#3287 Number). There is no function to compare such
; atom easily with pattern yet. Uncomment after equivalent-atom operation is
; introduced.
;!(assertEqualToResult
; (get-type (fmap (curry-a + 2) (UntypedC "5")))
; ())
Expand Down

0 comments on commit ac80774

Please sign in to comment.