switch SearchState to using Backtrack step
Matt S Trout [Wed, 22 Jun 2016 16:16:30 +0000 (16:16 +0000)]
lib/DX/SearchState.pm

index 9562373..99ac3f2 100644 (file)
@@ -1,6 +1,7 @@
 package DX::SearchState;
 
 use Types::Standard qw(Maybe);
+use DX::Step::Backtrack;
 use DX::Step::InvokeNextPredicate;
 use DX::Class;
 
@@ -42,9 +43,7 @@ sub with_one_step {
   return undef unless $first_alt;
   trace 'search.backtrack.rewind_to' => $first_alt->[1];
   return $self->but(
-    current_hypothesis => $first_alt->[0],
-    alternatives => \@rest_alt,
-    next_step => $first_alt->[1],
+    next_step => DX::Step::Backtrack->new,
   );
 }